Ref earlier post "Excel Time Calculation"

J

jc

For the formula in D2 "=C2-time(,50,) with no time in cell C2, can the
default value ####### be changed (to zero (0) or a blank cell)

Regards

jc
 
P

Pete_UK

Try this:

=IF(C2=0,0,C2-time(,50,)

Change the second 0 to "" if you want it to appear blank.

Hope this helps.

Pete
 
P

Peo Sjoblom

Try

=MAX(C2-TIME(,50,),0)


it's important that you format D2 as


hh:mm:ss

or

hh:mm

otherwise it defaults to AM/PM formatting and 0 will be returned as 12:00 AM


--


Regards,


Peo Sjoblom
 
P

Pete_UK

Sorry, bracket missing from the end of my formula:

=IF(C2=0,0,C2-time(,50,))

Pete
 
J

jc

Magic formulas. All sorted now. Thanks Pete & Peo.
I'm sure I'll be back with other questions.
jc
 
Top