Find and replace (for each) HELP <3

Greetings.

I need help to perform the following task:

I want to use Find and Replace within a For Each loop because I need to interact with each one.

For example:

I need it to return A1, then A2, A3, A4, and A5.

I tried this but not work:

@gustavo.souza try switching the Find drop down to Replace first and see if you’re able to work from there.

1 Like

@gustavo.souza or it might be easier to create a data table with column headers. Read the range from excel.

Then use that data table to find and replace using a for each data row.

For Each data row
Assign: currentrow(“YourColumnName”) = currentrow(“YourColumnName”).ToString().Replace(“OldValue”, “NewValue”)

Then write the range back to excel with or without the headers.

1 Like

@gustavo.souza

In whereto search try with Excel.currentSheet.Range(currentrow.FullRangeName)

Cheers

1 Like

Hi @gustavo.souza ,
We can use read range to get datatable
then use for each file in data table
use If activity to get value of it then return index of value
regards,

1 Like

Hi @gustavo.souza

Take the full sheet in the for each excel row as range


In find range just the CurrentRow & value to find

Find attached flow for your ref:
Find&Replace.zip (32.8 KB)
Hope this helps :slight_smile:

1 Like

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