by Kentucky » Sun Dec 12, 2010 1:39 pm
Hi Guys I seem to be getting somewhere with this problem
Using the code below It is finding the first instance of my search what I want is the last instance
Dim lookFor As Range
Dim rng As Range
Dim col As Integer
Dim found As Variant
Dim Row As Integer
Set lookFor = Sheets("Results").Range("R1")
Set rng = Sheets("Selections").Columns("C:C")
col = rng.Row
On Error Resume Next
Row = Application.WorksheetFunction.Match(lookFor, rng, 0)
found = Application.VLookup(lookFor.Value, rng, col, 0)
If IsError(found) Then
MsgBox lookFor & " not found"
Else: MsgBox "The look-up value of " & lookFor & " is " & found & " in row " & Row
End If
On Error GoTo 0
End If
Any advice would be great