thomasart23
New Member
- Joined
- Aug 23, 2016
- Messages
- 7
HI,
I have a a data set that appears as so:
<colgroup><col><col><col></colgroup><tbody>
</tbody>
The data set is mega long, so I am looking for a formula to continue down the bottom 3 cells in column B that will find the last event number assigned for the associated site on the previous date. So far I have used this array formula: =IF(AND(A20<>A19,C20<>C19),1+INDEX($B$2:$B19,MAX(($A20=$A$2:$A19)*MATCH(ROW($A$2:$A19),ROW($A$2:$A19)))),INDEX($B$2:$B19,MAX(($A20=$A$2:$A19)*MATCH(ROW($A$2:$A19),ROW($A$2:$A19)))))
It works great until I reach an "x" value (The "x" value are already assigned so the formula will be omitted from those cells as I add new data to the data set).
I am trying to figure out a way for the above formula to ignore the X values and assign the next number (2 to 3, 3 to 4, etc.)
Any advice would be greatly appreciated! Thanks!
Tom
I have a a data set that appears as so:
Site | Event Number | Date |
lm | 1 | 1/18/2017 |
lm | 1 | 1/18/2017 |
lm | 1 | 1/18/2017 |
lg | 2 | 1/18/2017 |
lg | 2 | 1/18/2017 |
lg | 2 | 1/18/2017 |
sd | 1 | 1/30/2017 |
sd | 1 | 1/30/2017 |
sd | 1 | 1/30/2017 |
zs | 1 | 1/30/2017 |
zs | 1 | 1/30/2017 |
zs | 1 | 1/30/2017 |
lg | x | 1/30/2017 |
lg | x | 1/30/2017 |
lg | x | 1/30/2017 |
lm | 2 | 2/15/2017 |
lm | 2 | 2/15/2017 |
lm | 2 | 2/15/2017 |
lg | 2/15/2017 | |
lg | 2/15/2017 | |
lg | 2/15/2017 |
<colgroup><col><col><col></colgroup><tbody>
</tbody>
The data set is mega long, so I am looking for a formula to continue down the bottom 3 cells in column B that will find the last event number assigned for the associated site on the previous date. So far I have used this array formula: =IF(AND(A20<>A19,C20<>C19),1+INDEX($B$2:$B19,MAX(($A20=$A$2:$A19)*MATCH(ROW($A$2:$A19),ROW($A$2:$A19)))),INDEX($B$2:$B19,MAX(($A20=$A$2:$A19)*MATCH(ROW($A$2:$A19),ROW($A$2:$A19)))))
It works great until I reach an "x" value (The "x" value are already assigned so the formula will be omitted from those cells as I add new data to the data set).
I am trying to figure out a way for the above formula to ignore the X values and assign the next number (2 to 3, 3 to 4, etc.)
Any advice would be greatly appreciated! Thanks!
Tom