Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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!!!!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7,247
Default 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!!!!


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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!!!!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default 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!!!!


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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!!!!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate negative hours (time) Jolanta Excel Worksheet Functions 7 September 18th 07 12:28 PM
I want to get negative hours if subtraction of hours is negative hema Excel Worksheet Functions 5 April 30th 07 10:02 AM
Drivers Hours Timesheet - Calculate Hours Worked on Weekly Basis Graham Excel Discussion (Misc queries) 2 January 28th 07 08:40 PM
Set negative numbers to zero. Do not calculate with negative valu Excel Headache Excel Discussion (Misc queries) 4 September 14th 06 08:56 PM
How can I show hours of more than 24 & negative hours? Peterlg Excel Worksheet Functions 1 January 18th 05 04:50 PM


All times are GMT +1. The time now is 02:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"