Essentially what my data looks like is:
f
s
f
s
f
s
f
s
f
f
f
s
f
f
f
s
f
s
f
s
And I am looking to sort out a certain type of row. If the row has a value of ‘f’, and it is immediately followed by a row with value ‘s’, the ‘f’ row should be removed. In the case of something like f f s, only the second ‘f’ would be removed.
Does anyone have any suggestions as to how to make that happen? Please let me know if I am unclear in my wording.
Thanks!
Hello,
Simply mark all your rows with integer index growing by 1 and at the same time store index values of your “S” rows.
Then delete all rows with index of “S” rows minus 1 (those are your “rows of interest”).
I cannot see in your example, If there is possibility of having one “S” row after another “S” row, but If there is, you can fix that by adding additional condition to delete all rows with indexes of “S” rows minus 1 if they are not “S” row.
I hope it makes sense.
Tomas
Hi Tomas,
Thank you for your post. This topic was opened twice, you can see the other for our solution viewtopic.php?t=6853#p11083