Excel Filter not working properly?

Hello,

I am trying to use the Excel Filter activity to filter a single column in a spreadsheet. I need to filter for up to 10 different text values.

I’ve tried using multiple Filter activities, but each one seems to remove the previous filter.

I have attached a sample test file.

I would like to be able to use a For Each loop and to iterate through a list of names and apply a filter for each one. It’s important that I am able to pass in the list from an asset.

Any ideas?
Is it possible to write an advanced expression such as “Name1” and “Name2” in the Advanced Filter expression editor.

Thanks for the help!

Filter Test.zip (10.6 KB)

1 Like

@james.harvey,

Try using VBA macro for this.

Hie @james.harvey if your Excel Column has multiple filter condition you can go with assign activity. use assign activity and create a datatable and write a linq query.
foe eq-
Assign
dtfilter(Datatable)-(
from row in dt1(yourinputdatatable)
where row(“yourcolumnname”) = “value” (Conditon) or there you can
add multiple condition)
Select.row
).copytodatatable
cheers Happy Automation

@james.harvey

If the end goal is to read the data after filter…then instead read the data and then use filter datatable in a loop…that should give you the filtred range

cheers

I have amended your code to get the results. Please find the details below

  1. After each filter - Add a read range activity that will read only the visible rows
  2. Next step would be to write this data table to a new sheet and keep append as enabled
  3. Repeat the same in the next iteration as well. But keep in mind to exclude the headers when the iteration is greater than 1
  4. At the end - new sheet will have the expected result

@james.harvey Let me know if you need more details.

Thanks for the help.
Can you return my file with your changes?

JH

@sharazkm32
I got it working.
Genius!

JH

Please mark as solution so that the solution will help others as well

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.