View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default How calculate difference between [t]:mm-format and general format

=G34/24-E40 if you want to format the answer as time
=G34-E40*24 if you want to format the answer as number or general in hours.
--
David Biddulph

"Lehmanns" wrote in message
...
Excel 2007. Challenge: I have a calculated value in [h]:mm-format "37:00"
(summing up the number of worked hours for a month) and a single value in
general format "80" (the total number of expected working hours for the
month).
I need to calculate the difference via a formula. I having "=g34-e40" for
the "80 minus 37:00" which should be 43. But obviously the two formats
makes
a value of either "#############" or "-78.46", depending on the format of
the
resulting cell.
Have tried with the CONVERT and INT-function, but no luck...
"=(G34-INT(G34))*24" made my 37:00 comes to 13, but not 37 (a difference
of
24 hours though)
Can You assist ?