MrExcel Publishing
Your One Stop for Excel Tips & Solutions

IF formula with time variables

Posted by David on August 18, 2001 11:29 AM

I need an IF formula that will take the time of day value in a cell and if that time value falls between certain times of the day ie 18:00-06:00 then the True value should be Non Billable and the False value should be Billable.
Thanks in advance for your help.

Posted by Mark W. on August 18, 2001 11:37 AM

=IF(PRODUCT({"06:00","18:00"}-A1)<0,"Billable","Non Billable")

Note: If you want an inclusive between condition
use "<=" as the relational operator.

Posted by Mark W. on August 18, 2001 11:42 AM

I should mention that my TRUE and FALSE values are
opposite of yours because of my interpetation of
your requirement. If my understanding is correct
you don't want to show times after 6:00 PM as
billable. Is that correct?