-
You could use the Match command like this:
[vba]Sub FindLastItem()
Dim MatchFound As Integer
On Error Resume Next
MatchFound = Application.Match("report", Columns(1), 0)
If MatchFound = 0 Then
MsgBox "No match found"
Else
MsgBox "Match found on row " & MatchFound
MsgBox "Selecting previous row..."
Range("a1").Offset(MatchFound - 2, 0).Select
End If
End Sub
[/vba]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules