H
Hans Hamm
I have the following, which works but it continues all the way down the column and I need it to end at the last row of data in Column A and not keep running...
The next question I have is how would one really write the "index, match" formula in VBA?
I have looked at several examples and not really getting my head around the examples.
Dim rng As Range 'Store Number
Dim rng1 As Range 'Do Not Call LookUp
Dim rng2 As Range 'Do Not Call Insert
Set rng = Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row)
Set rng1 = Range("U2:U" & Range("U" & Rows.Count).End(xlUp).Row)
Set rng2 = Range("D2" & Range("D" & Rows.Count).End(xlDown).Row)
With rng2
..Formula = "=index(V:V,MATCH(A2,U:U,0))"
..Value = .Value
End With
End Sub
Thanks Folks!
The next question I have is how would one really write the "index, match" formula in VBA?
I have looked at several examples and not really getting my head around the examples.
Dim rng As Range 'Store Number
Dim rng1 As Range 'Do Not Call LookUp
Dim rng2 As Range 'Do Not Call Insert
Set rng = Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row)
Set rng1 = Range("U2:U" & Range("U" & Rows.Count).End(xlUp).Row)
Set rng2 = Range("D2" & Range("D" & Rows.Count).End(xlDown).Row)
With rng2
..Formula = "=index(V:V,MATCH(A2,U:U,0))"
..Value = .Value
End With
End Sub
Thanks Folks!