Hi all,
I want VLOOKUP function through VBA Array. Please check attached file.....
I have tried below coding but its not working properly....
Sub vlOoo_kup()
Dim sh As Worksheet
Dim rng As Range
Dim arr
Dim i As Integer
Set sh = ThisWorkbook.Sheets("Singh")
Set rng = sh.Range("A1:G21")
arr = sh.Range("i10:i" & sh.Cells(Rows.Count, "i").End(xlUp).Row)
For i = LBound(arr) To UBound(arr)
Dim j As Integer
j = sh.Cells(Rows.Count, "j").End(xlUp).Row + 1
sh.Range("j" & j & "
" & j).FormulaArray = Application.WorksheetFunction.VLookup(arr(i, 1), rng, Array(2, 3, 4, 5, 6, 7, 8, 9), 0)
Next
End Sub
Thanks