vignesh1980
Programmer
Hi,
Can any one help with the code to find out the number of lines of text present in a cell in excel.
Can any one help with the code to find out the number of lines of text present in a cell in excel.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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