LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 577
Default Need help with a Formula

I have a lengthy formula where I solve one problem by changing the formula
and another keeps seeming to occur. In the last column shown in the data
below I am trying to calculate the amount of time that has passed between the
stop time of one row and the start time of the next row but there are a lot
of IF's. For example: if the start time is before 9:00 a.m. then the space
should be blank; if the start time is between 9:00 a.m. and 10:00 a.m. then
it should be subtracted by 9:00 instead of the previous Stop time; if the
hour is <4 then use the formula ROUND(MOD(A3-B2),1)*1440,0) instead; if it is
the first entry or there is no entry then the space in column D should be
blank. The current formula I have in column D is as follows:

=IF(OR(A1<"Start",A2<""),(IF(OR(HOUR(A2)=9,(AND (HOUR(A2)<4,MIN(A2)0))),ROUND(MOD(A2-MAX(R2,"9:00"),1)*1440,0),0)),0)

This formula works until I have two entries that occur after midnight as you
can see below. I haven't been able to insert the ROUND(MOD(A3-B2),1)*1440,0)
formula for HOUR < 4 without getting an error.

Any help would be greatly appreciated. Plus if there is a way to shorten
parts of the formula that I have so far that would be great. I think I am
making this more complicated than it should be.

Thanks,

Scott

A B C D
Start Stop Time
7:20 7:36 0:16
8:34 8:45 0:11
9:45 9:52 0:07 45
10:20 10:31 0:11 28
11:02 11:12 0:10 31
12:15 12:27 0:12 63
13:07 13:54 0:47 40
14:20 15:04 0:44 26
17:47 18:00 0:13 163
18:44 18:51 0:07 44
19:15 19:37 0:22 24
20:34 20:42 0:08 57
22:04 22:43 0:39 82
23:33 23:38 0:05 50
1:00 1:10 0:10 82





 
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
Regression Leverage Formula (Jerry W. Lewis or Mike Middleton)already have DFITS formula PJ[_3_] Excel Worksheet Functions 2 June 2nd 10 03:45 PM
Excel 2002 Formula: Urgent Conditional Formula Required Right Away - if possible blue[_2_] Excel Discussion (Misc queries) 2 July 11th 07 06:08 PM
Formula expected end of statement error, typing formula into cell as part of VBA macro [email protected] Excel Programming 1 July 20th 06 07:58 PM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


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