View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default I want to get negative hours if subtraction of hours is negative

On Thu, 26 Apr 2007 04:52:02 -0700, hema
wrote:


A B C
D E
1 In Time Out time Actual hours Working hours
2 9:00 17:00 8:00
8:45 =C2-D2

In the E2 cell i am getting only ####,here i want to get the negative hours




You have to either use the 1904 date system; or format the result cell as
something other than date/time, and perform the appropriate math to convert the
value (fraction of a day) into hours and minutes.
--ron