Hi
In my dataset I am trying to create a list of rows adjacent (both above and below) the row where a columns cells has a specific value i.e.
C1 C2 C3 C4
13 10 -4 12
12 14 -3 15
14 34 0 18
15 12 1 12
12 13 5 21
From this dataset I would want to get the row with 0 in column C3, and then the two adjacent rows (the row before and after)
So it should look like:
C1 C2 C3 C4
12 14 -3 15
14 34 0 18
15 12 1 12
I need to do this for anytime I have a 0 in column C3, any ideas?
Solved! Go to Solution.
Yes, worked perfectly! Thank you!
Hi! I have a very similar situation. Only difference is that I am looking for a value above 15 (instead of 0) and I am wanting to flag 20 rows prior to the occurrence and 20 rows after the occurrence (instead of 1 row prior and 1 row after). How would I change my syntax to achieve this?
@GIS_User01 It's possible to use the same method for your situation, but you would need to check 41 rows every time rather than 3. Here's what I would do instead:
If you want to flag the rows rather than filter you just need to change the last few tools, formula and summarize rather than filter and unique would do it.
If I'm looking for a row containing a string what would the formula look like?