Upload values based on matching Rows and Columns***I am using 2 worksheets-trying to write a two way lookup logic in VBA.. Currently I am using a Vlookup to match
1st worksheet is the template= called the “template”
2nd worksheet contains the data= data
Objective- Copy data from worksheet 2, where values are the same in the worksheet 1(template), must match on rows and column headers…
If there is no match, insert the value of “0”in Worksheet 1
If there is a matching value, copy the “$ value” from worksheet 2 (data) and paste it in worksheet 1(template)
Hence, I am copying data from worksheet 2 (data) and pasting the data in worksheet 1
Here is the VBA code that I have so far…Please help
Sub vbVlookup()
Range("A3").Formula = "=vlookup(A3,'!Data'!$A$3:$I$16,match(B3,$B$2:I$2$,0)+1,False)"
Range("A3").Value = Range("A3").Value
Range("B3").Value = Range("B3").Value
Bookmarks