I’m not entire sure how to write this in VBA using a macro.
I have a single Workbook, Compare.xls. Two sheets in it, Sheet1 and Sheet2.
Basically I’m attempting to take:
Sheet1
Date ID Other Sub Chan
10000 100 Repeat X 30
10000 101 Repeat X 40
Sheet2
ttc event Chan
XYZ L 30
XYZ L 40
XYZ L 6
And from this data, I need to compare the Chan column from Sheet1, to a matching record Chan record in Sheet2, and output joined data from both sheets on to a new sheet.
Example output would be:
Date ID Other Sub Chan ttc
10000 100 Repeat X 30 xyz
Any suggestions on a snippet on how I can move forward?
Just noticed that you want to use VBA – not too sure why when this can be easily done with built in formulas?
Because you are sort of going backwards using a
VLLOKUPmight not be the best choice try usingINDEXandMATCH…Here’s a simplified version …