D
damorrison
Hello,
I am trying to search for partial strings in a cell,
Sub Button1_Click()
Dim r As Range
Dim c As Range
Dim st As String
Set r = Range("A1", Range("A65536").End(xlUp))
st = InputBox("Enter Partial to Search", "Search By Address")
For Each c In r.Cells
If c = "*" & st & "*" Then '----The problem----
MsgBox c.Address
End If
Next c
End Sub
But do not know how to get the wildcard to work
I am trying to search for partial strings in a cell,
Sub Button1_Click()
Dim r As Range
Dim c As Range
Dim st As String
Set r = Range("A1", Range("A65536").End(xlUp))
st = InputBox("Enter Partial to Search", "Search By Address")
For Each c In r.Cells
If c = "*" & st & "*" Then '----The problem----
MsgBox c.Address
End If
Next c
End Sub
But do not know how to get the wildcard to work