Time greater than or less than

csilabgirl

Active Member
Joined
Aug 14, 2009
Messages
359
Excel 2002

In cell D2 I have the formulaa =NOW() and its formated for time.

in cell E2 I have manually typed in 10:00 am and it also is formatted for time.

Presently cell D2 says 9:20 AM. In cell C2 I have a formula:

=IF(D2>E2,"You are adding samples after the cut-off time","")

But it does not work. No matter what time is it, it always answers True. It seems like this should be simple enough, but I am missing something.

I have run an =ISNUMBER(cell) on both cells and they both come back true.

Thank you for the help.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
VoG,

Thank you that works. If you have a minute could you explain what the "MOD" is doing so that I can learn and then maybe find that it has use in other applications. If you dont have time, I understand.

Thank you
 
Upvote 0
Now returns Date + Time (date = integer portion, time = decimal portion). Using MOD(Now(),1) returns just the decimal part = time.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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