I need to find

  • Thread starter Thread starter cdde
  • Start date Start date
C

cdde

I need help using code that would search column A for value and the
choose the entire row that its in. If anyone can help. Than
 
How about:

Option Explicit
Sub testme()

Dim FoundCell As Range

With ActiveSheet.Range("a:a")
Set FoundCell = .Find(what:="whatever", _
after:=.Cells(.Cells.Count), _
LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False)
End With

If FoundCell Is Nothing Then
MsgBox "not found"
Else
FoundCell.EntireRow.Select
End If

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top