I have a need to search a list and display the data. I want to search for a name, not case sensitive. Tried to record one and copy it but the macro was empty. Any suggestions?
Printable View
I have a need to search a list and display the data. I want to search for a name, not case sensitive. Tried to record one and copy it but the macro was empty. Any suggestions?
Hi Austen,
Can you explain a little more? Define "search a list". And display the data where? On a new worksheet? In a message box?
Try this:
Code:Option Explicit
Sub Macro1()
Dim Cel As Range
Dim FirstAddress As String
With Range("A:A")
Set Cel = .Find(What:="Test", LookIn:=xlValues, _
LookAt:=xlWhole, MatchCase:=False)
If Not Cel Is Nothing Then
FirstAddress = Cel.Address
Do
MsgBox Cel.Address
Set Cel = .FindNext(Cel)
Loop While Not Cel Is Nothing And Cel.Address <> FirstAddress
End If
End With
End Sub
Thanks Jake
You're Welcome :beerchug:
Take Care
You may also want to check out this article by Johnske: http://www.vbaexpress.com/forum/arti...rticle&artid=5