Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Conditional Sum

I'm struggling with a difficult summation problem. My data is below. What I
need to do is...

For all records where the CT_ID is identical, if the REV TT is 0 and the REV
ACW is 0, I need to find the next row where REV TT is not 0 and sum the REV
ACW for all of the rows above. In this example below, CT_ID 11 at 2:00 and
2:30 PM have a REV TT of 0 with a REV ACW of 0. I want to add the REV ACW
to the last non-zero value above it. This would make the 11:30 AM REV ACW
621. Then I need to make the REV ACW at 2 and 2:30 0. When all is said and
done, the total of the REV ACW for CT_ID 11 would not change, but you would
never have a REV TT of 0 in the same row as a REV ACW of 0. Thank you in
advance for your help.

Leslie

TIME CT_ID REV TT REV ACW AHT
9:00:00 AM 11 0 0 0
9:30:00 AM 11 0 0 0
10:00:00 AM 11 310 858 584
10:30:00 AM 11 361 1202 782
11:00:00 AM 11 347 30 377
11:30:00 AM 11 121 2 123
12:00:00 PM 11 0 0 0
12:30:00 PM 11 0 0 0
1:00:00 PM 11 0 0 0
1:30:00 PM 11 0 0 0
2:00:00 PM 11 0 90 90
2:30:00 PM 11 0 529 529
3:00:00 PM 11 804 574 345
3:30:00 PM 11 0 788 788
4:00:00 PM 11 0 0 0
4:30:00 PM 11 0 0 0
5:00:00 PM 11 0 0 0
9:00:00 AM 12 0 0 0
9:30:00 AM 12 0 0 0
10:00:00 AM 12 0 0 0
10:30:00 AM 12 0 0 0
11:00:00 AM 12 191 166 357
11:30:00 AM 12 0 0 0

 
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
New Conditional Format Overriding Previous Conditional Format Rene Excel Discussion (Misc queries) 3 February 27th 08 06:08 PM
Conditional Rank (or rather, Conditional Range) [email protected] Excel Worksheet Functions 6 April 16th 07 06:15 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM


All times are GMT +1. The time now is 12:36 PM.

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"