The following formula is resulting in "0" in cell H2. The actual result should be 13 which can be determined when place the =LEN(D2) function in the H2 cell. Ultimately I want to run a macro which will count the length of the cell in all hows of the D column and past the result in the H column which didn't work so I created this short test. Can someone tell me the problem with this? Thanks
Sub CountSpaces()
Dim nn As Integer
nn = Len(D2)
Range("H2").Value = nn
End Sub
Sub CountSpaces()
Dim nn As Integer
nn = Len(D2)
Range("H2").Value = nn
End Sub