I get A1.1. and I'd like to show the count of two periods as I'm going to apply some format around the cells that have a certain number of periods.
MyCnt returns 0
Code: Select all
Sub CountPeriod()
Dim i As Long
Dim LastRow As Long: LastRow = Range("A" & Rows.Count).End(xlUp).Row
Dim MyText As String
Dim MyCnt As Long
For i = 1 To LastRow
MyText = Split(Range("A" & i), " ")(0)
MyCnt = WorksheetFunction.CountIf(Range("A" & i), ".")
Next i
End Sub