Hi,
New to VBA, hope someone can help.
I need a macro to do the following:
1) Prompt user to select an Excel file (i.e. xls or csv)
2) Import the above select file as a new worksheet in the active workbook and change the worksheet name to "GOOD"
3) Repeat "1" and "2" above and rename the imported worksheet to "BAD"
4) For each cell in column "A" in the "GOOD" worksheet (except the column header at top), lookup column "H" of the "BAD" worksheet and:
a) if not found (in column "H" of "BAD"), insert word "Missing" in column "K" of the respective row in "GOOD"
b) if found, compare the value of in column "B" to the value of the value in column "J" of the matched record in "BAD":
i) if matched, insert word "MATCHED" in column "K" of the respective row in "GOOD"
ii) if it doesn't match, insert word "CHECK" in column "K" of the respective row in "GOOD"
I'm hoping to get the codes for "1" to "3" above, which is probably piece-of-cake for most of you (but not me, not even after searching for hours in various forums).
Thanks in advance.
New to VBA, hope someone can help.
I need a macro to do the following:
1) Prompt user to select an Excel file (i.e. xls or csv)
2) Import the above select file as a new worksheet in the active workbook and change the worksheet name to "GOOD"
3) Repeat "1" and "2" above and rename the imported worksheet to "BAD"
4) For each cell in column "A" in the "GOOD" worksheet (except the column header at top), lookup column "H" of the "BAD" worksheet and:
a) if not found (in column "H" of "BAD"), insert word "Missing" in column "K" of the respective row in "GOOD"
b) if found, compare the value of in column "B" to the value of the value in column "J" of the matched record in "BAD":
i) if matched, insert word "MATCHED" in column "K" of the respective row in "GOOD"
ii) if it doesn't match, insert word "CHECK" in column "K" of the respective row in "GOOD"
I'm hoping to get the codes for "1" to "3" above, which is probably piece-of-cake for most of you (but not me, not even after searching for hours in various forums).
Thanks in advance.