Excel FILTER By Colour

How to filter Particular column by colour and move those entries to other sheet

column name: RRN

Dear Nidhi,

Use Get Cell Color ExcelActivity and compare the value with your desired colour,If it matches,copy the entire column to another sheet.
Thanks,
Geetishree Rao

And how do I compare the value?

Dear Nidhi,

1.Use Excel App scope to read the data,then loop through each row of the datatable and get the color of the cell of column RRN lets say “A”(col in excel) using Get Cell color activity
“A”+(intIndex+2).ToString
Set the Output index =intIndex to get the index of the row when u loop thru the datatable.
intIndex+2 - 0 indexed and first row in excel is header so we add 2

2.Use if condition to check the color:
colCell=Color.Yellow
If condition satisfied then add the value to a new datatable (Build a datatable with one column “RRN” and use addrow activity and pass the value)
3.Write this datatable in a new sheet using write range.

Attaching a sample xaml for your reference.

Please mark this as the solution if it solves your query so as to help others facing same issue.

Thanks ,
Geetishree Rao

ForumMovColColor.xaml (9.7 KB)

1 Like

Thank you :slight_smile:

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