VLOOKUP Time Error

MoOsEBoT88

New Member
Joined
Sep 13, 2011
Messages
15
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am looking to return the planned activity for the current hour for that Bay

So at 10:32am it should rounddown the 10:00 and show whats planned in for that bay for 10:00 - 10:59

I have this formula but its returning the wrong result.

=VLOOKUP(FLOOR(NOW(),1/24),Plan!A2:B14,2,TRUE)

Hope someone can point me in the right direction.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Try this, but there may still be some rounding issues. If still problems, can you post what you have in Plan A2:B14 with XL2BB?

Excel Formula:
=VLOOKUP(MOD(FLOOR(NOW(),1/24),1),Plan!A2:B14,2,TRUE)
 
Upvote 0
Cheers, glad it worked for you.
.. and thanks for updating your profile. (y)

In case you were wondering, the issue is that NOW() includes today's Date and Time. The date needed to be removed to just look up the time. :)
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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