View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
carrietom carrietom is offline
external usenet poster
 
Posts: 2
Default calculate hours without negative

Thank you so much - I can't believe I missed that!!!!

"Chip Pearson" wrote:

Your formula is backwards.
=(B2-C2)*24
should be
=(C2-B2)*24

If there is the possibility that the time period will cross midnight, use

=((C2-B2)+(C2<B2))*24


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"carrietom" wrote in message
...
I feel really stupid because I have been reading every post on calculating
hours and trying the formulas but none get me what I want so sorry for
this
easy post.

B2 = Start Time (8:00 AM)
C2 = End Time (12:30 PM)
D2 = Hours Worked

The one formula that gets me closest is: =(B2-C2)*24 however, I get -4.50
and I only want 4.50. I have tried changing to 1904 date system but that
didn't seem to do anything. Am I missing something? Thanks!!!!