I don't understand why you write that a filter does not work in your case.

After you select the from text/csv
option, at the next screen, select Edit
.

Select to Use First Row as Headers
Then, from the dropdown arrow for column 2, you can select the Filter option, and check the n
box only.
You will now have a recorded query that you can use for subsequent iterations of the CSV file.
If you need to filter for multiple values, you can import the CSV without filtering, then execute multiple queries against the originally imported data.
EDIT: If you choose this method, you should update the external connection query first. Then a Refresh All
will update the dependent queries. You could do this by selecting Refresh on Workbook Open
just for that query; or selecting it for none of them, but doing a refresh for that external query upon Workbook Open.
Other options:
- Duplicate the table and have different auto or advanced filters on each iteration.
- you could use a formula. One problem is that you would have to adjust your formula after each import if the range to be examined is different. With your data table in
A1:B9
, and your filter value in G1, a formula might look like:
Product: =IFERROR(INDEX(Sheet5!$A$2:$B$9,AGGREGATE(15,6,1/(1/((Sheet5!$B$2:$B$9=$G$1)*ROW(Sheet5!$A$2:$B$9))),ROWS($1:1))-ROW(Sheet5!$A$1:$B$1),1),"")
Validity: =IFERROR(INDEX(Sheet5!$A$2:$B$9,AGGREGATE(15,6,1/(1/((Sheet5!$B$2:$B$9=$G$1)*ROW(Sheet5!$A$2:$B$9))),ROWS($1:1))-ROW(Sheet5!$A$1:$B$1),2),"")
Then fill down as far as needed