negative time in Hours and mins

M

Matt

is there a way i can show negative time eg needs to work 3:00 hours but only
works 2:00 hours it will come up as -1:00hours but if then they do an extra
2:00 hours it will show 1:00
 
J

Jacob Skaria

With hours to work in A1 and
actual worked in B1 try the below formula in C1

=IF(B1>=A1,B1-A1,"-"&TEXT(ABS(B1-A1),"hh:mm"))

PS: This is only for display and not for calculations; as excel do not
display negative time..

If this post helps click Yes
 
H

Hans Terkelsen

Matt said:
is there a way i can show negative time eg needs to work 3:00 hours but only
works 2:00 hours it will come up as -1:00hours but if then they do an extra
2:00 hours it will show 1:00

Hi Matt.
The [h] formatting can show negative hours.
But you can not have negative minutes shown also.
Try this user formatting
[h]:mm;-[h]:--
It will show 3:00 for the positives, and -1:-- for the negatives.
When only the format is fiddled with, the underlying numbers don't change,
and can be used in further calculations.
Hans T.
 

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