If Range("A1").Font.Italic = True Then
For each cl in Range("A1:D1")
If cl.Font.Italic = True Then
i =i+1
End If
Next cl
MsgBox "The number of Italic style cells in the range is " & i
Public Function Count_Italic(Rng As Range) As Long
Dim Cel As Range
Application.Volatile
For Each Cel In Rng
If Cel.Font.Italic = True Then
Count_Italic = Count_Italic + 1
End If
Next Cel
End Function