Reputation: 1171
Below is an example of the original column's information and the data I want to extract (using a formula, not a filter).
Where List 1 is column A and List 2 is column B. Example:
List 1:
1 Ok 2 Ok 3 Ok 4 Ok 5 FC34534534534 6 Ok 7 Ok 8 Ok 9 FC34534576878
List 2:
1 FC34534534534 2 FC34534576878
Any tips would be greatly appreciated as always!
To be clear - I don't want to copy/paste, sort or do anything but have the formula work this out.
Upvotes: 2
Views: 10135
Reputation: 71578
Assuming that list 1 is in column A:A, you can use:
=IFERROR(INDEX($A$1:$A$9,SMALL(IF($A$1:$A$9<>"Ok",ROW($A$1:$A$9),9.99E+207),ROW())),"")
In cell C1 (the column is not important, but the row is since we have the function ROW()
in the formula).
Then drag down.
EDIT: I forgot to mention that this is an array formula and as such will work properly only with Ctrl+Shift+Enter.
Upvotes: 3
Reputation: 59485
Guessing that the numbers on the left are row numbers and that your list is in ColumnA without a header, and based on Excel 2007:
=IF(A1="OK","",A1)
in B1 and copy down to suit.Upvotes: 0