Update Multiple cells in Excel if a Condition is Met

I am trying to process an excel file that has multiple columns. If a row encounters an error, the bot should update all rows with matching ID with the error. In my example spreadsheet, line 4 displays ‘Error’ so now I want the bot to write "Error’ to any rows where LOAD_DOC = 2.
test.xlsx (19.0 KB)

image

Hello Bprice10,

Try to 1. Read Excel File: Start by using an activity or command to read the Excel file into your RPA process. This will load the data from your spreadsheet into a format that you can work with.
2. Loop Through Rows: Use a loop (e.g., “For Each Row” in UiPath) to iterate through each row in the Excel file.
3. Check Condition: Within the loop, check the condition you mentioned. In your case, you want to check if the “LOAD_DOC” column equals 2 and if the “Error” condition is met in a specific row.
4. Update Matching Rows: If the condition is met, update the value in the “LOAD_DOC” column with “Error” for all matching rows. You can use an activity/command to write data to the Excel file.

It should work

Hi,

Can you try the following sample?

Sample20230907-1L.zip (89.9 KB)

Regards,

Thanks for the response! Unfortunately, I was able to view the workflow in its entirety because the activities were not resolved.

Thank you for the response. Using the outline you provided, I was able to update the value of each row using a write cell inside of the for each loop.

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