calculate hours without negative

G

Guest

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!!!!
 
C

Chip Pearson

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)
 
·

·!¦[··ï¡?¡ï·»Gen°Digger«·ï¡?¡ï··]¦!·

Carrie,

Try the reverse:

=(C2-B2)*24

See if that works for you.
 
G

Gord Dibben

=(C2-B2)*24 with D2 formatted as General or Number

Latest time less earliest time.


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top