How to use set range activity

I have an excel with two sheets …Sheet1 and sheet2 in both sheets there is one column called Total amount due.so if total amount due is below 2000 i have to mark that particular with red color…In the set color activity the range should be dynamic…can you please explain how to provide that…

@Chippy_Kolot,

You can use Find/Replace Value activity to find the desired value. This will give you the range which you can pass to Set Range.

To dynamically set red color for “Total Amount Due” below 2000 in UiPath, read the data from both sheets using Read Range, loop through rows with For Each Row, check if CInt(row(“Total Amount Due”)) < 2000 in an If activity, calculate the range dynamically using range = “A” + (dataTable.Rows.IndexOf(row) + 2).ToString, and use Set Range Color to apply red formatting for that range. Repeat for both sheets.

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