How do I put the if function inside the lookup? - Daily Routine sheet

arunkw

New Member
Joined
Nov 22, 2010
Messages
4
I have a sheet - 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 |

Here, say my toilet time would be from 6:00am to 6:15am
I want 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

Using the if function for time comparison and a lookup should solve my requirement, right?
Please help. How do I put the if function inside the lookup?
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
In the column "A" make a list with activities.
Format cells in the column "B" as time.
In the column "B" make a list with times.
Try with this formula in the "C1".
"=IFERROR("It's time to ..." & INDEX(A1:A4,MATCH(TIME(HOUR(NOW()),MINUTE(NOW()),SECOND(NOW())),B1:B4,1)+1,1),"Nothing")"
 
Upvote 0

Forum statistics

Threads
1,223,982
Messages
6,175,776
Members
452,668
Latest member
mrider123

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top