Fill excel cell color according to condition

Hello!
Please tell me how to paint the cells in green, provided that the word “update” appears.
At the moment, the program adds excel files from the directory to the database and looks for the word “update”. How to implement the selection in green, provided that we do not know in advance the range in which it is necessary to paint over.


Fill colour.xaml (9.3 KB) sample 1.xlsx (8.0 KB) sample 2.xlsx (8.0 KB)

1 Like

Hi @sereganator ,

you can try using set range color

Thanks!

1 Like

Thanks, but SetRange says C + intindex.
But I don’t know in advance what the row or column might be (A, B, C, D, etc.).

1 Like

@sereganator - Please check this post…

In your case, you have to read each row and check if its contains the word update…then do color…

1 Like

Thanks. But the word “update” is not the only one in the cell, for example “02.12.2005 update”. Can you use for each row to look for exactly the word update? As I understand it, regular expression only searches in text and not in database rows.

1 Like

@sereganator - I have developed a workflow in UI Automation which does this job for you.

please let me know, if you are interested in that.

The reason why I choose this route, in order to use “Set Range Color” activity we need to provide the range, which a cell value of A2 or B2 or A1:B2 like this…which is really difficult in your case because we have to extract the cell address where the word “Update” found…

Demo Video…

2 Likes

@sereganator - I have finally able to do it without using UIAutomation. Let me know, if you are still looking for this.

1 Like

Hey! Yes, of course I’m looking. Thanks. Please show me.

@sereganator - Here you go…SetRangeColor_ColumnIndex.zip (44.1 KB)

Run this project…you will see the cell value with the word ‘update’ updated with Background color Orange.

If this helps, please mark my post as solution.

1 Like

Awesome, thanks a lot, everything works!

2 Likes

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