![]() |
Find cells using wildcards
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 |
Find cells using wildcards
If c.Value Like "*" & st & "*" Then
-- __________________________________ HTH Bob "damorrison" wrote in message ... 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 |
Find cells using wildcards
Terrific,
Thanks for that |
Find cells using wildcards
Great, thanks for that
|
All times are GMT +1. The time now is 09:15 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com