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

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,216,736
Messages
6,132,426
Members
449,727
Latest member
Aby2024

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