ExcelTip.com
Account Icon Account Icon Account Icon
ExcelTip.com

Go Back   Excel Help Forum > Limelight Media - ExcelTip.com Books > F1 Get the most out of Excel Formulas & Functions

Notices

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 11-17-2006, 07:28 PM
Leelaakk Leelaakk is offline
Registered User
 
Join Date: 17 Nov 2006
Posts: 2
Leelaakk is on a distinguished road
need help with formula for time

I'm trying to calculate the number of hours worked when it crosses over to a new day. For instance, 15:00 to 2 a.m. the next day. When I use the formula +b2-a2+if(a2>b2,1) the result is .54. Can anyone tell me what I can do to resolve this and come up with the correct value of 12 hours? I've also tried using 24 in place of the 1 and it gives me the same result.

Please help!
Reply With Quote
  #2  
Old 11-17-2006, 07:33 PM
VBA Noob's Avatar
VBA Noob VBA Noob is online now
Wicked Forum Moderator
 
Join Date: 25 Apr 2006
Location: London, England
Posts: 11,003
VBA Noob will become famous soon enough VBA Noob will become famous soon enough
Hi,

Have a look at this link

http://www.excelforum.com/excel-worksheet-functions/580820-timesheet-calculation.html

Or you could check out Chip Pearson website

http://www.cpearson.com/excel/overtime.htm

This might help

=(A3-A2+(A3<A2))*24

Format as Number and 2 Decimal places


VBA Noob
__________________
_________________________________________


Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters

Please remember to wrap code.

Forum Rules

Please add to your signature if you found this link helpful. Excel links !!!

Last edited by VBA Noob; 11-17-2006 at 07:40 PM.
Reply With Quote
  #3  
Old 11-17-2006, 07:48 PM
Leelaakk Leelaakk is offline
Registered User
 
Join Date: 17 Nov 2006
Posts: 2
Leelaakk is on a distinguished road
need help with formula for time

I got the help I needed from the Cpearson.com site.

Thanks for your help!
Reply With Quote
  #4  
Old 11-17-2006, 07:49 PM
VBA Noob's Avatar
VBA Noob VBA Noob is online now
Wicked Forum Moderator
 
Join Date: 25 Apr 2006
Location: London, England
Posts: 11,003
VBA Noob will become famous soon enough VBA Noob will become famous soon enough
Glad you got it

VBA Noob
__________________
_________________________________________


Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters

Please remember to wrap code.

Forum Rules

Please add to your signature if you found this link helpful. Excel links !!!
Reply With Quote
Reply

Bookmarks

New topics in F1 Get the most out of Excel Formulas & Functions


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


All times are GMT -4. The time now is 05:59 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0