I would take a simpler INDEX approach, giving an index number to each row with "approved" in the correct column.
On Sheet1 in X9, put this formula and copy down as needed (this column can be hidden later):
=IF(B9="Approved", X8+1, X8)
On sheet2, this formula in B2 to indicate how many values should be found:
=MAX(Sheet1!X:X)
On Sheet2 you can pull over the matching values by putting this formula anywhere down in column A, then copying down and across as needed:
=IF(ROW(A1)>$B$1, "", INDEX(Sheet1!A:A, MATCH(ROW(A1), Sheet1!$X:$X, 0)))
Bookmarks