Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How do i display a negative time as a res of distracting 2 times?

In a sheet about working time i want to extract two times.
1 is the normal working hours for the day
2 is the actual worked hours on a day
If 2 < 1, the result is negative - I worked not enough hours on that day.
The result is displayed as ######.

Question:
Is it posible to display negative hours c.q. times in a sheet?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default How do i display a negative time as a res of distracting 2 times?

If you can settle for a text result,

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

HTH
Kostis Vezerides

On Jul 12, 8:56 pm, Red Bullit <Red
wrote:
In a sheet about working time i want to extract two times.
1 is the normal working hours for the day
2 is the actual worked hours on a day
If 2 < 1, the result is negative - I worked not enough hours on that day.
The result is displayed as ######.

Question:
Is it posible to display negative hours c.q. times in a sheet?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default How do i display a negative time as a res of distracting 2 times?

Red,

Visit John Walkenbach's site:

http://www.j-walk.com/ss/excel/usertips/tip051.htm

***************************
Dealing with negative time values

Because Excel stores dates and times as numeric values, it's possible to add or subtract one from
the other.

However, if you have a workbook containing only times (no dates), you may have discovered that
subtracting one time from another doesn't always work. Negative time values appear as a series of
hash marks (########), even though you've assigned the [h]:mm format to the cells.

By default, Excel uses a date system that begins with January 1, 1900. A negative time value
generates a date/time combination that falls before this date, which is invalid.

The solution is to use the optional 1904 date system. Select Tools, Options, click the Calculation
tab, and check the 1904 date system box to change the starting date to January 2, 1904. Your
negative times will now be displayed correctly, as shown below.

Be careful if you workbook contains links to other files that don't use the 1904 date system. In
such a case, the mismatch of date systems could cause erroneous results.

***********************************

HTH,
Bernie
MS Excel MVP


"Red Bullit" <Red wrote in message
...
In a sheet about working time i want to extract two times.
1 is the normal working hours for the day
2 is the actual worked hours on a day
If 2 < 1, the result is negative - I worked not enough hours on that day.
The result is displayed as ######.

Question:
Is it posible to display negative hours c.q. times in a sheet?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i display negative time differently? Nick Berning Excel Discussion (Misc queries) 1 October 3rd 06 03:46 PM
How do I get Excel to display a negative value for time? labrat Charts and Charting in Excel 0 June 7th 06 08:13 PM
How do I display negative time values in excell? tomashruska Excel Worksheet Functions 2 April 26th 06 07:55 PM
How do I display time in a negative format? PCERM Excel Worksheet Functions 3 December 28th 05 01:58 PM
What is the formula to display a negative time results? Robluc65 Excel Worksheet Functions 1 October 14th 05 11:15 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"