Can you clarify please ... do you want to know how many embedded line-feeds are in the contents of a cell? Or do you want to know how text wrapping has affected a cell?
Cheers, Glenn.
Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
Sorry for the delay in responding. I want to exactly how text wrapping has affected a cell. That is if a cell has more text it is wrapped into 3 or 4 lines, at this instance how to find out the number of lines in the cell.
Public Function CountTextLines(InRow As Long, Optional StdRowHgt As Double = 12.75) As Integer
If (StdRowHgt > 0) Then
CountTextLines = Int(ThisWorkbook.Worksheets(1).Cells(InRow, 1).RowHeight / StdRowHgt)
Else
CountTextLines = 0
End If
End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.