Hi,
Use the IF function like this:
- Code: Select all
=IF(A10 < StartTime, "Eearly", "")
This formula will write "Eearly" or nothing in the cell it occupies, depending upon whether the time in A10 is smaller (earlier) than "StartTime". Make sure that A10 is formatted as Date (Rightclic/FormatCells/Number)
"StartTiume" is a reference, say 8:00 a.m.
a) You can enter the time directly into the formula - not so good
b) Place a cell, formatted as Date, at the top of the sheet and enter the start time there.
If you do this you can change the start time in future without needing to change any of the formulas.
Say, the start time is in cell B2, replace the word "StartTime" in the formula with $B$2.
You may also name B2 as "StartTime". Place the Cursor in B2. "B2" appears in the Name Box at the top left of your screen. Write StartTime in that box and press enter. You can now refer to B2 as StartTime anywhere in your workbook. The formula given above already refers to it. you can sue it without change. If you want to change the start time you just change the value in B2.
This should do the trick. Enjoy your evening.
Have a great day!
Sisyphus
I do this for "honour and country" - much less of the latter, actually.
If I helped you, award points, plenty of them.
If I bored you, deduct points for being too long-winded. (I know, :lol)