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

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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