How to display negative amount of time

%3CLINGO-SUB%20id%3D%22lingo-sub-1725593%22%20slang%3D%22en-US%22%3EHow%20to%20display%20negative%20amount%20of%20time%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1725593%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20everyone%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%E2%80%99m%20making%20a%20worktime%20sheet%20for%20my%20husband.%3C%2FP%3E%3CP%3EI%E2%80%99m%20not%20having%20any%20trouble%20deducting%20his%20start%20and%20stop%20times%2C%20but%20I%20made%20a%20column%20for%20the%20amount%20of%20hours%20he%E2%80%99s%20supposed%20to%20work%2C%20and%20a%20column%20for%20the%20hours%20he%20effectively%20worked.%20And%20if%20the%20result%20of%20this%20deduction%20is%20a%20negative%20number%20(for%20instance%20if%20he%20was%20supposed%20to%20work%208h%20but%20only%20did%207%2C5)%20Excell%20won%E2%80%99t%20show%20me%20the%20negative%20number...%20which%20should%20be%20-30min.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eis%20there%20a%20solution%20for%20this%20problem%3F%3C%2FP%3E%3CP%3Ethanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1725593%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1725760%22%20slang%3D%22de-DE%22%3ESubject%3A%20How%20to%20display%20negative%20amount%20of%20time%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1725760%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F813696%22%20target%3D%22_blank%22%3E%40Lynn_vdb%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CH1%20id%3D%22toc-hId-554261649%22%20id%3D%22toc-hId-554261649%22%20id%3D%22toc-hId-554261649%22%3E%3CFONT%20size%3D%224%22%3EChange%20the%20way%20negative%20numbers%20are%20displayed%3C%2FFONT%3E%3C%2FH1%3E%3CP%3E%3CFONT%20size%3D%222%22%3E%3CSPAN%20class%3D%22appliesToItem%22%3EExcel%20for%20Microsoft%20365%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22appliesToItem%20x-hidden-focus%22%3EExcel%20for%20Microsoft%20365%20for%20Mac%3C%2FSPAN%3E%20Excel%20%3CSPAN%20class%3D%22appliesToItem%22%3E2019%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22appliesToItem%22%3EExcel%202016%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22appliesToItem%22%3EExcel%202019%20for%20Mac%3C%2FSPAN%3E%20Excel%20%3CSPAN%20class%3D%22appliesToItem%22%3E2013%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22appliesToItem%22%3EExcel%202010%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22appliesToItem%22%3EExcel%202007%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22appliesToItem%22%3EExcel%202016%20for%20Mac%3C%2FSPAN%3E%20Excel%20for%20Mac%20%3CSPAN%20class%3D%22appliesToItem%22%3E2011%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%222%22%3E%3CSPAN%20class%3D%22appliesToItem%22%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-gb%2Foffice%2Fchange-the-way-negative-numbers-are-displayed-104b47a6-8ae2-471f-8f73-c4b96e7bb146%3Fui%3Den-us%26amp%3Brs%3Den-gb%26amp%3Bad%3Dgb%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CFONT%20size%3D%223%22%3Ehttps%3A%2F%2Fsupport.microsoft.com%2Fen-gb%2Foffice%2Fchange-the-way-negative-numbers-are-displayed-104b47a6-8ae2-471f-8f73-c4b96e7bb146%3Fui%3Den-us%26amp%3Brs%3Den-gb%26amp%3Bad%3Dgb%3C%2FFONT%3E%3C%2FA%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3CH1%20id%3D%22toc-hId--1253192814%22%20id%3D%22toc-hId--1253192814%22%20id%3D%22toc-hId--1253192814%22%3E%3CFONT%20size%3D%224%22%3ECreate%20a%20custom%20number%20format%3C%2FFONT%3E%3C%2FH1%3E%3CP%3E%3CFONT%20size%3D%224%22%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Fcreate-a-custom-number-format-78f2a361-936b-4c03-8772-09fab54be7f4%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CFONT%20size%3D%223%22%3Ehttps%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Fcreate-a-custom-number-format-78f2a361-936b-4c03-8772-09fab54be7f4%3C%2FFONT%3E%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20be%20happy%20to%20know%20if%20I%20could%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%222%22%3E*%20Kindly%20Mark%20and%20Vote%20this%20reply%20if%20it%20helps%20please%2C%20as%20it%20will%20be%20beneficial%20to%20more%20community%20members%20reading%20here.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1725812%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20display%20negative%20amount%20of%20time%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1725812%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F813696%22%20target%3D%22_blank%22%3E%40Lynn_vdb%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAssuming%20the%20actual%20end%20time%20is%20in%20cell%20A1%2C%20the%20anticipated%20end%20time%20is%20in%20cell%20B1%2C%20and%20the%20difference%20is%20in%20cell%20C1%2C%20then%20that%20could%20be%3A%3C%2FP%3E%3CP%3EFor%20hours%3A%3C%2FP%3E%3CPRE%3E(A1-B1)*24%3C%2FPRE%3E%3CP%3E%26nbsp%3BFor%20minutes%3A%3C%2FP%3E%3CPRE%3E(A1-B1)*1440%3C%2FPRE%3E%3CP%3EAlso%2C%20be%20sure%20that%20cell%20C1%20is%20formatted%20as%20either%20General%20or%20Number.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi everyone,

 

I’m making a worktime sheet for my husband.

I’m not having any trouble deducting his start and stop times, but I made a column for the amount of hours he’s supposed to work, and a column for the hours he effectively worked. And if the result of this deduction is a negative number (for instance if he was supposed to work 8h but only did 7,5) Excell won’t show me the negative number... which should be -30min.

 

is there a solution for this problem?

thanks!

4 Replies
Highlighted

@Lynn_vdb 

 

Change the way negative numbers are displayed

Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel 2019 Excel 2016 Excel 2019 for Mac Excel 2013 Excel 2010 Excel 2007 Excel 2016 for Mac Excel for Mac 2011

https://support.microsoft.com/en-gb/office/change-the-way-negative-numbers-are-displayed-104b47a6-8a...

Create a custom number format

https://support.microsoft.com/en-us/office/create-a-custom-number-format-78f2a361-936b-4c03-8772-09f...

 

I would be happy to know if I could help.

 

Nikolino

I know I don't know anything (Socrates)

 

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

 

Highlighted

Hello @Lynn_vdb,

 

Assuming the actual end time is in cell A1, the anticipated end time is in cell B1, and the difference is in cell C1, then that could be:

For hours:

(A1-B1)*24

 For minutes:

(A1-B1)*1440

Also, be sure that cell C1 is formatted as either General or Number.

Highlighted
Maybe, for the formula, you could use absolute value (ABS function), but then use conditional formatting to test if he worked less than what he was supposed to and apply a custom number format of

-h:mm

or something similar. So, the cell contents will still be positive, but the formatting will display it as negative? If you need totals, then you would have to use sumif functions to test if the actual time is <=> the expected time and net the results.

Maybe someone else will have a better suggestion. I can't say I've ever tried to work with negative time values.
Highlighted

@Lynn_vdb 

Time is always time, we can't go to the past and shift time back. It's always positive. However, you may show time difference not in terms of time, but in terms of hours or days or minutes difference between two events. Taking into account that  1 day is equal to 1, thus 1 hour is equal to 1/24, you may deduct time of event happened at 07:30 from one happened at 08:00, multiply difference on 24 and the result will be -0.5 if you apply General format to it. That means -1/2 hours difference.

 

Other words, =(B1-A1)*24 with applying General format to the result.