Hi Friends,
I need an urgent help regarding loop in filtering. For some reason I am unable to attach the input file but I am sharing what I exactly need.

The above screenshot is the output of the filter loop process done manually. There is a big data set from which this is filtered out. Suppose "ID" is the column where we need to put the filter and "Final ID" is the value column where we get the number which we need to filter in column "ID".
For example, I need to start my filter from "312787". Now when we filter this in the "ID" column we get the "Final ID" as "312788" again we have to filter this "312788 in the "ID" column and this process needs to be repeated till there is no match in the "ID" column or the "Final ID" column is blank.
In the screenshot we have started filtering from the bottom and in the second row we get "Final ID" as "1" then we filter it in the "ID column and we can see not the new "Final ID" in row 1 is blank, which means now the loop is complete and there is no more entry to filter in the "ID" column.
If anyone can share me a workflow which can do this loop filtering, It will really be helpful.