IF...Then using Time

C

CH Mack

I have a spreadsheet that functions as a timesheet for my company. I
want to be able to add a formula that basically says "If the value
entered in cell A2 is greater than 9:00 AM, enter "TARDY"".

I've tried this and I was told that it was a circular reference.

(I used the following: "IF A2>9:00 AM,"Tardy","Not Tardy")

CAn anyone help?

I tried just using "9" but then the formula doesn't work right.

Thanks!
 
J

Jerry W. Lewis

Time is stored as a decimal fraction of a day, so you could use
=IF(A2-INT(A2)>9/24,"Tardy","Not Tardy")
Or per Help for the TIME() function you could use
=IF(A2-INT(A2)>TIME(9,0,0),"Tardy","Not Tardy")

The -INT(A2) may be unnecessary, depending on how the value in A2 was
generated, but including it hurts nothing and makes the formula more
bulletproof.

Jerry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top