Find Cell Address of sheet

Hello,
I have issue with the cell address, when I run in for each row, I have to give condition on row(0), when condition is fulfill , I need to update another column of it in row(8), to write that how can I give the cell address.


I need to change my cell “Old” with “New”.
Your help will be thankful.
Thank you

@James90

Does these rows have any column name at the top ?

1 Like

Hi @singhonkar
Yes its “Status”

@James90

For column 8, name is Status. And what’s the name for column 0?

1 Like

@singhonkar
For column 0 it Menu

@James90

Inside for each row loop, if condition should be row(“Menu”).ToString.equals(“Your Value”)

If it fulfills, use assign activity , on left side it should be row(“Status”) and on the right side , “New”.

Try the above explained code and let me know if this works for you.

1 Like

@singhonkar
I need to write cell the old to new after condition is fulfilled and condition is row(“Status”).ToString.equals(“OLd”), after that I need to update it to New.

@James90

Sorry for the wrong understanding. If your condition is to check the value of status field and it’s Old, then change it to New.

If condition should be Row(“Status”).ToString.equals(“Old”) . If it fulfills, then under assign activity, use row(“status”) = “New”.

1 Like

@singhonkar
Its not updating in the sheet? :frowning:

@James90

Please find the attached workflow.

ExcelMatchUpdate.zip (8.1 KB)

Hope it will sorted your issue.

1 Like

@James90

Can you try this:

Inside the loop, use this Assign activity
row.Item("Status") = row.Item("Status").ToString.Replace("Old", "New")

1 Like

@singhonkar
No, It’s still not writing New in the sheet.

@Rahul_S
I tried with your workflow, it update on 2nd row of my status column not the match one, as you have assign count=2; I need to find the count as same row number where condition is match.
Thank you.

@James90

You to do some modifications in that according to your file like Count initial value, Str_Value_To_Match value and try again.

It’s logic implemented such that it will update only if url is match.

Please let me know if you stuck somewhere

Hope it helps you :slightly_smiling_face:

1 Like

@Rahul_S
I have like this step but I am stuck with the count variable, as I need to get that index number of it.
Thank you

@James90,

To find the index of the row cell : DataTablename.rows.indexOf(row) + 2

@James90

I’m also wondering why it’s not working. Tried multiple ways but yes, it’s another challenge and helps me in my learning too.

I’ll share my workflow once i’m able to do this.

@James90

I figured out my mistake. In code which i shared earlier, The changes were reflecting in the data table only not to excel file due to write range activity was missing. To reflect those changes into excel file, we need to use the same. Please find the below attached screenshots:




Let me know if you’ve any queries.

1 Like

@singhonkar
Thank you for the response, I got the solution by @lakshman

@lakshman
Thank you for the solution.

1 Like