Hi all,
I have a data set with specific N and P flags in a column. I would like to isolate/mark (with a 1) the rows in between NP flag pairs only when the P flag occurs after a minimum of 6 rows, inclusive of the N flag row. Only an N flag after a P flag will create a new isolation interval.
Value | Flag | Mark |
234 | N | 1 |
234 | 1 | |
23 | N | 1 |
4 | P | 1 |
458 | 1 | |
45 | 1 | |
8 | P | 1 |
58 | ||
567 | P | |
... | ||
N | 1 | |
1 | ||
P | 1 | |
1 | ||
N | 1 | |
1 | ||
P | 1 | |
N | 1 | |
1 | ||
1 | ||
1 | ||
1 | ||
P | 1 | |
1 | ||
P | 1 |
Any and all help would be appreciated. I tried using the filter tool with the multirow formula but I am having trouble figuring out the 6-row margin part. Thanks in advance!
You should be able to accomplish that using a Record ID tool first then use the Record ID as reference for your formula.