This function gets the count by counting the number of elements in the Split String section using a substring.
Function getStrOccurenceCount(Text As String, SubString As String)
getStrOccurenceCount = UBound(Split(Text, SubString))
End Function
You can change your code as follows
( "pptsr" ). ( "BL2" f).Value = getStrOccurenceCount (cellCheck.Text, "SMM:" )
getStrOccurenceCount .
Sub calculateamlp2()
Const SUBSTRING As String = "SMM:"
Dim rangeAG As Range
Dim data As Variant
Dim x As Long
Set rangeAG = Range("AJ2", Range("AJ2").End(xlDown))
data = rangeAG.Value
For x = 1 To UBound(data)
data(x, 1) = getStrOccurenceCount(CStr(data(x, 1)), SUBSTRING)
Next
rangeAG.EntireRow.Columns("BL").Value = data
End Sub
: 999,999 , 0.9375 :

user6432984