Find String and write/replace it into another cell


Does anybody know how i can search in a specific row for the first string that looks like this

and replace the string with the last 2 digits and write it into another cell?


Hi @mcLauge

If I do,

  1. Read target row
  2. Loop each cell value in the row
  3. If cell value is Target, get last 2 digit and write to another, else do nothing.
  4. End loop.

Isn’t it work?

Hi @mcLauge
Hope these steps could help you resolve this
–use excel application and pass the file path as input
–use read range activity and get the output with a variable of type datatable named outdt
–use a for each row loop and pass the above variable as input
–inside the loop use a if condition like
where columnindex is the index of each column in the datatable which usually starts from 0 for the first column
–and if the above condition satisifies it will go to THEN part where we can use a assign activity like this
out_value = Split(row(columnindex).ToString,"_")(1).ToString
where out_value is a variable of type string
–use another assign activity and mention like this
counter = counter + 2
where counter is a int32 variable with default value of 0 defined in the variable panel
–now use a write cell activity and mention the
value as out_value
sheetname with what sheet to be updated
range (mention the cell where we want to)

Hope this would help you
Cheers @mcLauge

Hi @mcLauge,

I have created a workflow for your requirement and it will give you a solution. (20.3 KB)



Thank u very much Mohanraj! it worked perfectly!

Cheers :slight_smile:

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