Dim Count As Integer Dim Target As String Dim Cell As Object Dim N As Integer Sub Target_Count() Count = 0 Target = InputBox("character(s) to find?") If Target = "" Then GoTo Done For Each Cell In Selection N = InStr(1, cell.Value, target) While N <> 0 Count = count + 1 N = InStr(n + 1, cell.Value, target) Wend Next Cell MsgBox count & " Occurrences of " & target Done: End Sub
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.