ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   calculate hours without negative (https://www.excelbanter.com/excel-worksheet-functions/163107-calculate-hours-without-negative.html)

carrietom

calculate hours without negative
 
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!!!!

Chip Pearson

calculate hours without negative
 
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!!!!



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

calculate hours without negative
 
Carrie,

Try the reverse:

=(C2-B2)*24

See if that works for you.


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




Gord Dibben

calculate hours without negative
 
=(C2-B2)*24 with D2 formatted as General or Number

Latest time less earliest time.


Gord Dibben MS Excel MVP

On Mon, 22 Oct 2007 16:58:00 -0700, carrietom
wrote:

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



carrietom

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




All times are GMT +1. The time now is 07:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com