Hi folks,
Kicking myself that I haven't figured out this yet on my own.
See the mini-sheet below and here is what I'm trying to do:
Thank you for your help.
Kicking myself that I haven't figured out this yet on my own.
See the mini-sheet below and here is what I'm trying to do:
- The Aton_Delta (C) column is data that comes in, from that I have a helper column that has a "1" in it if the C column data is non-zero
- The DeltaFromStart (D) column is the result I am trying to get.
- The value in column D should use the first occurrence of a non-zero in column C (12 for example) and subtract it from each subsequent non-zero value in the C column until a zero is encountered again.
- It then starts over when another non-zero delta value is encountered in column C.
Thank you for your help.
Book2 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | Helper | Run Date | Aton_∆ | ∆FromStart | Desired result in column D | |||||||
2 | 6/13/2022 | 0 | 0 | 0 | ||||||||
3 | 6/12/2022 | 0 | 0 | 0 | ||||||||
4 | 6/11/2022 | 0 | 0 | 0 | ||||||||
5 | 1 | 6/10/2022 | 12 | 12 | First non-zero delta is 12 | |||||||
6 | 1 | 6/9/2022 | 16 | 4 | =16-12 | |||||||
7 | 1 | 6/8/2022 | 25 | 13 | =25-12 | |||||||
8 | 1 | 6/7/2022 | 32 | 20 | =32-12 | |||||||
9 | 1 | 6/6/2022 | 4 | -8 | =4-12 | |||||||
10 | 6/5/2022 | 0 | 0 | Delta is zero again so delta from start should = 0 | ||||||||
11 | 6/4/2022 | 0 | 0 | Delta is zero again so delta from start should = 0 | ||||||||
12 | 6/3/2022 | 0 | 0 | Delta is zero again so delta from start should = 0 | ||||||||
13 | 6/2/2022 | 0 | 0 | Delta is zero again so delta from start should = 0 | ||||||||
14 | 6/1/2022 | 0 | 0 | Delta is zero again so delta from start should = 0 | ||||||||
15 | 5/31/2022 | 0 | 0 | Delta is zero again so delta from start should = 0 | ||||||||
16 | 5/30/2022 | 0 | 0 | Delta is zero again so delta from start should = 0 | ||||||||
17 | 1 | 5/29/2022 | 6 | 6 | First non-zero delta is 6 | |||||||
18 | 1 | 5/28/2022 | 17 | 11 | =17-6 | |||||||
19 | 1 | 5/27/2022 | 35 | 29 | =35-6 | |||||||
20 | 1 | 5/26/2022 | 38 | 32 | =38-6 | |||||||
21 | 1 | 5/25/2022 | 41 | 35 | =41-6 | |||||||
22 | 1 | 5/24/2022 | 12 | 6 | =12-6 | |||||||
23 | 1 | 5/23/2022 | 18 | 12 | =18-6 | |||||||
24 | 5/22/2022 | 0 | 0 | Delta is zero again so delta from start should = 0 | ||||||||
25 | 5/21/2022 | 0 | 0 | Delta is zero again so delta from start should = 0 | ||||||||
26 | 5/20/2022 | 0 | 0 | Delta is zero again so delta from start should = 0 | ||||||||
27 | 5/19/2022 | 0 | 0 | Delta is zero again so delta from start should = 0 | ||||||||
28 | 5/18/2022 | 0 | 0 | Delta is zero again so delta from start should = 0 | ||||||||
29 | 5/17/2022 | 0 | 0 | Delta is zero again so delta from start should = 0 | ||||||||
30 | 5/16/2022 | 0 | 0 | Delta is zero again so delta from start should = 0 | ||||||||
31 | 5/15/2022 | 0 | 0 | Delta is zero again so delta from start should = 0 | ||||||||
32 | 5/14/2022 | 0 | 0 | Delta is zero again so delta from start should = 0 | ||||||||
33 | 5/13/2022 | 0 | 0 | Delta is zero again so delta from start should = 0 | ||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
D6,D18 | D6 | =C6-C5 |
D7,D19 | D7 | =C7-C5 |
D8,D20 | D8 | =C8-C5 |
D9,D21 | D9 | =C9-C5 |
D22 | D22 | =C22-C17 |
D23 | D23 | =C23-C17 |
B2 | B2 | =TODAY() |
B3:B33 | B3 | =B2-1 |