2) Table 1 and 2 in different sheets.


Option Explicit
Sub VlookUpExampleDifferSheets()
'This example look up table in different sheet (TABLE 1 - ActiveSheet, TABLE 2 - Sheet 2)
Dim rw As Long
For rw = 3 To 12
Cells(rw, 3) = Application.VLookup(Cells(rw, 2), Sheets("Sheet2").Columns("B:C"), 2, False)
Next
End Sub

Comments

Popular posts from this blog

50 Excel VBA Oral Interview Questions