How to improve Excel Match Criteria


I am trying to compare two excel spreadsheets and based on matching criteria, it will enter cell data into target spreadsheet (input2.xls).

I have input1.xlsx which has two columns: column1 and column2. It needs to compare with input2.xlsx column1 and column2. If these column match then enter quantity data from input1.xlsx quantity column into input2.xlsx quantity column. If they do not match move on to the next match.

This is my match criteria:

row.Item(“column1”).ToString = row2.Item(“column1”).ToString and row.Item(“column2”).ToString = row2.Item(“column2”).ToString

however it does not seem to work and when I run it, it will only enter ‘64’ quantity (see screenshot of input1) into the quantity column in the input2.xlsx for all rows even if they do not match on above criteria.

Any insight would be helpful.


input1.xlsx (9.5 KB)

input2.xlsx (9.4 KB)

OpsAutomation.xaml (20.7 KB)