Filter Excel Sheet and Write Cell Based on Filter


I am trying to find a way to filter an excel sheet with over ten thousand rows. I tried a ‘For Each’ initially, but it was very time consuming.

I am trying to filter the excel sheet and write a value in a “Status” column for the current rows displayed in the filtered sheet. I need to keep all ten thousand rows, and it should be unfiltered after the end of the sequence.

*I am able to do this in StudioX, but do not know how to code in Studio. Also able to create a VBA macro.

Any help is greatly appreciated.

Hi @carlos_avila

Can u show ur requirements by providing a screenshot of what u need at output

1 Like


Please see attachment as a reference.

Each person name Charles and Michael, should have the color “Red” assigned under column B (Color). Every cell highlighted yellow in this case should have the word “Red”.

I showed a picture how I was able to do this in StudioX. I am trying to do this in Studio.

1 Like

Hi @carlos_avila check this workflow (1.4 MB)

Hope it helps you


Nived N

Happy Automation


Please ignore anything about color. I was highlighting for the purpose to show the example of the cells that will need to be updated with the word “Red”.

I tried an if in my for each activity initially but with over Ten thousand rows, it is taking a long time to execute because going through each row.

I am able to do this in StudioX easily , but trying to learn how to do this in Studio. Thank you.

you can try the below code in “Invoke Code " Activity by modifying it with your required conditions
dataTable.Select(”[Status]=‘YELLOW’ ").ToList().ForEach(Sub(row) row(“Status”)=“RED”)

1 Like


How would I go about this with if Name = Charles or Michael, the write to Cell the word “Red” under “Color” column.

Thank you.

Hi @carlos_avila,
please try with the below code
dataTable.Select(”[Status]=‘YELLOW’ AND( [name]=‘Charles’ OR [name]=‘Michael’)").ToList().ForEach(Sub(row) row(“Status”)=“RED”)