BradleyS
Active Member
- Joined
- Oct 28, 2006
- Messages
- 347
- Office Version
- 2010
- Platform
- Windows
The table below shows an ID reference and each -3 (shown in red in my example only) is an accumulative count of the duration and needs to be added to the value above it.
So if the ID is NOT - 3 it will be just be the adjacent duration value. However, if the ID is -3 it now has to be added to the duration above it.
You can see my attempt at trying to make this work, but I'm having no luck
What I need is for the final output to look like this:
Any help will be most appreciated. Thank you in advance.
So if the ID is NOT - 3 it will be just be the adjacent duration value. However, if the ID is -3 it now has to be added to the duration above it.
Excel 2010 | ||||||
---|---|---|---|---|---|---|
N | O | P | Q | |||
1 | No. | ID | duration | SUM | ||
2 | 1 | 0 | 5 | |||
3 | 2 | 2 | 5 | |||
4 | 3 | -3 | 5 | |||
5 | 4 | -3 | 5 | |||
6 | 5 | 0 | 5 | |||
7 | 6 | 1 | 5 | |||
8 | 7 | 0 | 5 | |||
9 | 8 | 0 | 5 | |||
10 | 9 | 2 | 5 | |||
11 | 10 | -3 | 5 | |||
12 | 11 | 0 | 5 | |||
13 | 12 | 0 | 5 | |||
Session_Slots |
Cell Formulas | ||
---|---|---|
Range | Formula | |
Q2 | {=IF(O2=-3,SUM(P2:INDEX(P2:$P$12,MATCH(TRUE,(P3:$P$12=""),0))),"")} | |
Press CTRL+SHIFT+ENTER to enter array formulas. |
You can see my attempt at trying to make this work, but I'm having no luck
What I need is for the final output to look like this:
Excel 2010 | ||||||
---|---|---|---|---|---|---|
N | O | P | Q | |||
17 | No. | ID | duration | SUM | ||
18 | 1 | 0 | 5 | 5 | ||
19 | 2 | 2 | 5 | 15 | ||
20 | 3 | -3 | 5 | |||
21 | 4 | -3 | 5 | |||
22 | 5 | 0 | 5 | 5 | ||
23 | 6 | 1 | 5 | 5 | ||
24 | 7 | 0 | 5 | 5 | ||
25 | 8 | 0 | 5 | 5 | ||
26 | 9 | 2 | 5 | 10 | ||
27 | 10 | -3 | 5 | |||
28 | 11 | 0 | 5 | 5 | ||
29 | 12 | 0 | 5 | 5 | ||
Session_Slots |
Any help will be most appreciated. Thank you in advance.