+ Reply to Thread
Results 1 to 3 of 3

Count the number of rows/lines in a wrap text cell

  1. #1
    Registered User
    Join Date
    02-13-2009
    Location
    california
    MS-Off Ver
    Excel 2003
    Posts
    10

    Question Count the number of rows/lines in a wrap text cell

    Hi,

    I'm trying to count the number of rows/lines in a wrap text cell. In the attached sheet, cell A1 contains text which includes "soft returns". At a column width of 10, the text wraps to create 7 lines of text, including the empty line. When I use the following formula, which I found on the web, it returns a value of 3. Can you please help me figure out a formula that will properly count the total number of lines in the cell (7)? Thanks!

    =LEN(A1)-LEN(SUBSTITUTE(SUBSTITUTE(A1,CHAR(10),""),CHAR(13),""))
    Attached Files Attached Files
    Last edited by ashleyhkim; 02-19-2013 at 05:18 PM.

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Count the number of rows/lines in a wrap text cell

    Although the warp text feature depicts 7 lines of text, that is only an appearance thing!
    Actually there exist only 3 lines separated by the CHAR(13). When you expand the cell width you'd notice that.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    02-13-2009
    Location
    california
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Count the number of rows/lines in a wrap text cell

    Thanks for replying, Ace_XL!
    Is there no way to count the number of lines that are "depicted"?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1