LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 270
Default Time difference calculation

Hi

Excel 2003

In C5 i have a start time eg 12.30pm and in D5 I have a finish time eg
20.45pm.

I need to calculate the hours and minutes worked in E5, with a minimum of 1
hour. In other words if 45mins is worked then 1 hour is returned, but
anything greater than 1 hour will be as is.

This nearly works, but if the start time is say 10pm and finish is next day
at 6am then it fails.
=IF(D5-C5<=TIME(1,0,0),TIME(1,0,0),IF(D5<C5,D5+1,D5)-C5)

I have tried to incorporate (D5<C5,D5+1,D5)-C5) into the first part of the
function but I cannot get it to work.

All assistance gratefully received.

Sandy

 
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
Least Significant Difference calculation Peggy Excel Discussion (Misc queries) 3 June 30th 08 07:31 PM
Difference between date & time calculation Chris Narowski[_2_] Excel Discussion (Misc queries) 6 March 17th 08 08:03 PM
Time difference calculation question Bob Wall Excel Worksheet Functions 1 January 2nd 08 05:25 AM
subtract the time difference from another time difference Dannigirl Excel Discussion (Misc queries) 3 September 30th 07 03:47 PM
Time difference calculation Sasha Excel Worksheet Functions 5 July 22nd 06 05:55 AM


All times are GMT +1. The time now is 07:14 AM.

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

About Us

"It's about Microsoft Excel"