ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   recording negative time (https://www.excelbanter.com/excel-discussion-misc-queries/22136-recording-negative-time.html)

james

recording negative time
 
I am trying to set up a spreadsheet to record staff flex-time. Formating to
record time produces errors when negative are introduced.

Harald Staff

Hi

Set your spreadsheet to 1904 calendar (Tools Options menu) to display
negative time. (Note that dates will shidt 4 years 1 days off by doing
this).

HTH. Best wishes Harald

"james" skrev i melding
...
I am trying to set up a spreadsheet to record staff flex-time. Formating

to
record time produces errors when negative are introduced.




David McRitchie

Hi James,
If you are trying to obtain the hours through midnight, you would have
to add 24 hours (24 hours = 1 day) to the end time.

C2: 22:00
D2: 06:00
E2: =D2-C2+(C2D2)

C2D2 is a logical test it returns True or False
or in arithmetic 1=True 0=False

More information on Date and Time in
http://www.mvps.org/dmcritchie/excel/datetime.htm
http://www.cpearson.com/excel/datetime.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"james" wrote in message ...
I am trying to set up a spreadsheet to record staff flex-time. Formating to
record time produces errors when negative are introduced.




Bob Phillips

It is still a correct value even if it doesn't show as such, so any further
calculations using that value will be correct.

If it is just to see it correctly, you could force it like so

=IF(B1-A1<0,"-","")&TEXT(ABS(B1-A1),"hh:mm:SS")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"james" wrote in message
...
I am trying to set up a spreadsheet to record staff flex-time. Formating

to
record time produces errors when negative are introduced.





All times are GMT +1. The time now is 01:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com