if you dont' mind a VBA UDF you can use this to get the count of char(10) :
Function CountOccurOf(SrchStr As String, StrVal As String, Optional StrtPos, Optional CaseSensitive) As Long
Dim LCount, Count As Long
If IsMissing(StrtPos) Then StrtPos = 1
If IsMissing(CaseSensitive) Then CaseSensitive = True
CountOccurOf = 0
If StrtPos > Len(StrVal) Then Exit Function
If Len(SrchStr) = 0 Or Len(StrVal) = 0 Then Exit Function
Count = 0
For LCount = 0 + StrtPos To Len(StrVal)
If CaseSensitive Then
If Mid(StrVal, LCount, Len(SrchStr)) = SrchStr Then Count = Count + 1
Else
If UCase(Mid(StrVal, LCount, Len(SrchStr))) = UCase(SrchStr) Then Count = Count + 1
End If
Next LCount
CountOccurOf = Count
End Function
To insert into your workbook, open VBA editor (Alt+F11),
Insert -> Module
Copy the Above code, then Paste into the new module,
Save, Then Close Editor;
your Formula would Look like this :
A1: =LEN(A2)+CountOccurOf(CHAR(10),A2)
Hope this helps
Bookmarks