Help Please with IF for dates

slinky192001

Board Regular
Joined
Mar 16, 2007
Messages
100
Hello,

I want to write and IF formula in Cell A1 which basically says,

if the date and time in cell B1 is equal to or greater than the date and time in C1 and less than or equal to the date and time in D1 then write 'On Time',
if the date and time in cell B1 Falls before the dates and times of cells C1 then write 'Early'
If the date and time in cell B1 falls after the dates and times of cells D1 then write 'Late'.

Can anyone assist me with this???
Thank you in advance

c
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hello,

does this give excpected results

=IF(B1 < C1,"Early",IF(B1 > D1,"Late","On Time"))

without the spaces
 
Last edited:
Upvote 0
Sorry about my typo, it should've read...

Code:
=IF(AND(B1>=C1,B1<=D1),"On Time",IF(B1<C1,"Early","Late"))

...but these guys seam to have it covered anyway!
 
Upvote 0

Forum statistics

Threads
1,214,896
Messages
6,122,132
Members
449,066
Latest member
Andyg666

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