How to update specific excel row based on other row value?


One challenge found here. Can someone help me please ?
IF I have same value on column D for multiple row , And I want to update each based on specific row, How should I do that ?
EX: D1 = 123 , D2 = 123
I want to update P1 = “Test” and again when Bot search for D2 , IT has to update P2 = “Test” or whatever criteria.
Currently it is updating P1 only each time.

Currently it is updating the first only each of the time .
I am using lookup range and write range activity.

Please help here .



Using ForEach row and IF activity with Assign will give you the output.

ForEach row in DataTable

IF row("D1").ToString.Equals(str_ToCompare)

    Assign row("P1") = "Test"

Kindly try and let us know.


1 Like

Why you use the lookup range activity ?

1 Like

Hello @PALKUMARI_PATEL - Please share a sample input excel

1 Like

Hey @ushu I did not get it . It is giving me wrong row number using counter variable and give default value as 2 .

See sample File.

I want to update column column L based on Column B .
I am using for each row to get the values from column B
Sample.xlsx (9.8 KB)
and then checking price and other column with my database’s data. IF not match then want to update column L “Not Match”.

I am not getting correct row number.

@Nithinkrishna @Palaniyappan Can you help me here ?

Used Lookup to check the cell and update different cell based on the first cell value. But it was giving me some error while there is duplicate values. And I have to update duplicate values also.

I believe you can use DataTableVariable.Rows([rownumber])([columnnumber]) in an assign statement so for example DataTableVariable.Rows([1])([2]) = DataTableVariable.Rows([1])([3]) would assign the value in the data table at row 2, column 3 to the value of data table at row 2, column 4.

1 Like

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