To set color to a specific cell in excel based on condition

Hi All,

Am trying to match the values from Sheet1 and Sheet2, if the Sheet1 values in all columns matching with Sheet2 have to insert a new column named ‘status’ in Sheet1 and update as ‘Match’ with green color.
If any value in the particular column is not matching, that needs to be marked with ‘yellow’ color and ‘status’ value should be updated as ‘NoMatch’ with Red color.

Have attached the sample excel.

Please assist with above workflow or sample, i tried few types, however am able to match the values but unable to set the color to output data.

Thanks in advance,
Surya17-02-2020 - Copy.xlsx (9.2 KB)

@SuryanarayanaMatta Not sure if you are asking how to color a cell using VBA… If so, use the below code
Range(“cellIndexValue”).Interior.ColorIndex = 4

If you wantto use Uipath, bring in “Set Range color” activity and in the properties provide the cell address/range and colour in the below format

System.Drawing.Color.Green or System.Drawing.Color.Blue etc

Thanks for quick response.

Could you please share sample xaml for attached excel sheet…thanks again…

@SuryanarayanaMatta SET Color Range.xaml (5.5 KB)
Here you go!

Thanks a lot for quick response. I will check it once and update the solution

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