Dim iCount As Integer
Sub findit()
Dim str As String
Dim iLen, iRes As Integer
iLen = Len(str)
For i = 2 To 557
str = Range("D" & i).Value
iCount = 0
iRes = howmany(str, " Range("M" & i).Value = iCount
Next i
End Sub
Function howmany(str As String, sSearch As String, iStart As Integer)
Dim iTemp, iRes As Integer
iTemp = InStr(iStart, str, sSearch)
iStart = iTemp
If iTemp = 0 Then
howmany = iCount
Else
iCount = iCount + 1
iTemp = howmany(str, sSearch, iStart + 1)
End If
End Function
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment