Hi,
I need some help with Excel automation please. I have 2 excel files (Sheet 1 and Sheet 2). Both Sheets have values in Column A (ID number) and Column B (Store Number) that I need to compare to values in Column A (ID number) and Column B (Store Number) for Sheet 2 and if those values already exist together in Sheet 2 (For example, ID number and Store Number value in Sheet 1 Row 1 matches ID number and Store Number value in sheet 2), then do nothing, else, assign the Values in Sheet 1 and Sheet 2 to unique variables. All values are strings. I got so far -
Open Excel Application Scope for Sheet 1, Read range.
For each row,
Assign Col 1 row 1 value to Var1, Col 2 row 1 to Var2
Open Excel Application Scope for Sheet 2, Read range.
Assign Col 1 row 1 value to Var3, Col 2 row 1 to Var4
Assign StringA=Var1+Var2 (for example if Var1 is 551 and Var2 is 001, this creates a unique string
551001)
Assign StringB=Var3+Var4
If, StringA=StringB, do nothing
else, create assign StringA to FinalStr
The problem is, for every row in Sheet1, I want it to go through each row in Sheet 2 and see if StrA exists and if not, assign StringA to FinalStr. How can I do this?
THANKS IN ADVANCE