Solved time formula excel with certain condition.

July 16, 2015 at 21:10:23
Specs: Windows 7
(D4-C4+(D4<C4))*24
it show right.
only i like to put like if I enter before 7:00AM, i like to see error and if I enter after any 10:00 pm it showing error. that means my store open 7:00AM to 10:00PM When i make schdule it will show right.

See More: time formula excel with certain condition.

Report •


#1
July 17, 2015 at 03:18:39
Please use the Post Reply and do not create another separate thread.

I'm still not clear on where you are having a problem,
the formula works correctly for the data you have given.

What data does NOT work?

Are you using times that are Greater Than 24 hours?

MIKE

http://www.skeptic.com/


Report •

#2
July 17, 2015 at 04:43:12
✔ Best Answer
After re-reading your post several times,
do you want a formula that will give a warning
if any time prior to 7:00 AM is entered and
if any time after 10:00 PM is entered?

If so, then try this formula:

=IF(OR(C4<TIME(7,0,0),D4>TIME(22,0,0)),"ERROR",(D4-C4+(D4<C4))*24)

This will first check cell C4 to make sure the time entered is 7:00 AM or later
then it will check cell D4 to make sure the time entered is 10:00 PM or earlier.

Is that what your looking for?

MIKE

http://www.skeptic.com/

message edited by mmcconaghy


Report •

#3
July 18, 2015 at 05:29:21
EXCELLENT, THAT I AM LOOKING FOR, THANKS

Report •

Related Solutions


Ask Question