carl.hayes
New Member
- Joined
- Oct 16, 2008
- Messages
- 21
I am trying to return how many cells contain a string of text as entered by the user but I am struggling to put wildcards around my search term. Below is the code I have so far.
Can anyone help me with this?
Can anyone help me with this?
Code:
Dim search as String
Dim occurance As Integer
search = InputBox("Search for", "Search Term")
occurance = WorksheetFunction.CountIf(Cells, search)
MsgBox (occurance)