Drop this code into VBA and it will be a 'reverse' vlookup that returns the last match instead of the first. the formula is exactly the same as =vlookup, but it starts =VarLookRev(.
In order to work, whole columns must be selected for the lookrange, not just part of them.
Function VarLookRev(Source As String, lookrange As Range, Column As Integer) As String
Dim Row As Long
Dim ChoiceRow As Long
Dim Value As Integer
Dim Found As Boolean
Dim CountIf As Integer
With lookrange
For Row = 1 To lookrange.Rows.Count
If .Cells(Row, 1).Value = Source Then
Value = Value + 1
ChoiceRow = Row
End If
Next Row
VarLookRev = Cells(ChoiceRow, Column).Text
Exit Function
End With
End Function
Let me know if it helps!
Bookmarks