Pairing historic time with current time

retrac

New Member
Joined
Aug 11, 2006
Messages
25
Office Version
  1. 365
Platform
  1. Windows
I am trying to make this formula work:

=IF(AND($A$1<=0.451388888888889,$A$1>=0.397916666666667),1,2)

$A$1 is the current time. The formula =now() . It is 1/25/2018 20:03 a the time of this post.
0.451388888888889 is one time. It is 1/0/00 10:50
0.397916666666667 is the other time. It is 1/0/00 9:33

Since the dates of the current time and the historic times do not match, the formula does not work properly. I am fine using dates, but do not need to. I really just need the times to align with the current time, so the formula will work.

I am open to changing the decimal times to something else, or arranging a new formula. Thank you.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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