Jump to content

How to use vlookup on an array? - For daily routine


Recommended Posts

I have a spreadsheet - daily routine which has two columns: activity and time as shown here

| Activity             | Time     |
|----------------------|----------|
| Sleep 😴              |  6:00 am |
| Toilet 🚽             |  6:15 am |
| Get ready for gym 🤸‍♂️ |  6:30 am |
| Exercise 💪           |  7:50 am |
| ... more things      |  9:00 pm |
| ... still more       | 10:45 pm |
| Sleep 😴              |  6:00 am |
 
I wanted to find out, say in C1 which activity is current for me using now()
I.e., if it’s 6:45am on my watch, it should show me Exercise 💪 in C1
Thanks to Adam D. PE, this formula works like magic to get the result =VLOOKUP(MOD(NOW(),1),{B2:B,A2:A},2,1)
 
Now, I want to reproduce same result in autoit, how to do that?
To have easy solution say, I copy-paste spreadsheet data in array directly in code, right?
Use for loop and run the above vlookup function and show the answer using tooltip.
How to achieve this? please help.
 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...