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: 3
Default time and if statements

Working on a time sheet I need to deduct cell(a1)- start time from cell(b1) -
end time plus another 30 minutes - lunch time (TIME(0,30,0)? But I need
nested if statements also as in:

if (endTime - startTime <4hrs, endTime - startTime,if(endTime -
startTime4hrs, (endTime - startTime) - 30mins, if((endTime - startTime) -
30mins8hrs, 8hrs)))

This might not appear to make sense but it does because surplus hours will
be in another cell to be calculated at a different rate.

I have been doing this just with numbers, but it gets awkward taking away
the 30 minutes as in ((16.30 - 08.00)-0.30) = 8, (correct),but, ((16:30 -
08.30)-0.30) = 7.7 (because it's time represented by a number it should be
7.5, or if time 7.30)

There must be a simple way round this isn't there?
 
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
Hot key for time? Dave in Des Moines New Users to Excel 2 March 24th 06 04:31 PM
Hot key for time? Dave in Des Moines Excel Worksheet Functions 2 March 24th 06 04:15 PM
Hot key for time? Dave in Des Moines Excel Discussion (Misc queries) 1 March 24th 06 03:46 PM
time sheet to calculate 2 different columns John Sullivan Excel Worksheet Functions 1 October 21st 05 06:48 AM
Using "IF" and "AND" statements with current time Bill Excel Worksheet Functions 3 April 18th 05 08:21 PM


All times are GMT +1. The time now is 05:12 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"