+ Reply to Thread
Results 1 to 6 of 6

Removing char(10) only from the end of data in one cell

  1. #1
    Registered User
    Join Date
    04-23-2012
    Location
    Split
    MS-Off Ver
    Excel 2010
    Posts
    14

    Removing char(10) only from the end of data in one cell

    Hi!
    I have to combine data from 10 cells into one cell, so that each data is displayed in a new row inside that cell. I have combined them with "=A1&char(10)&A2&char(10)&A3...".
    The problem is that not all rows have the same amount of data in the combined cell and I got some very big cells with one or two data and many new line signs at the end.

    I've tried to copy values and define that inside the cell the text is wraped, but not all data are the same length, and it is impossible to adjust the column for all cells to display in the right manner.
    The TRIM function removes all the char(10), and I don't want to remove them all.
    Tried to insert
    =A1&if(A2><0;char(10);"")&if(A2><0;A2;"")&.... and
    =A1&if(A2><" ";char(10);"")&if(A2><" ";A2;"")&.... but got the same result.

    Any suggestions how to resolve this problem, or do it in another way would be very appreciated

    Thank you very much for your help.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Removing char(10) only from the end of data in one cell

    Hi ejla,

    I believe Char(10) is Alt + enter.. try that if you have less data to process.


    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    04-23-2012
    Location
    Split
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Removing char(10) only from the end of data in one cell

    Thank you...I know that char(10) is Alt+Enter. I don't want to do it in every cell manually.

  4. #4
    Registered User
    Join Date
    04-23-2012
    Location
    Split
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Removing char(10) only from the end of data in one cell

    Maybe I haven't explained it well. If it was a matter of one cell I would do it manually .

  5. #5
    Registered User
    Join Date
    04-23-2012
    Location
    Split
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Removing char(10) only from the end of data in one cell

    My data looks like that in the picture. In the right column is shown the content of the cell without wrapping.
    I want to delete the little squares that are at the end in most of the cells, and to autoformat the size of the cell depending of the amount of real data inside of it. I hope that this clears what I'm asking.

    noname.gif

  6. #6
    Registered User
    Join Date
    04-23-2012
    Location
    Split
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Removing char(10) only from the end of data in one cell

    I have resolved it!
    The correct formula looks like this and leaves just one new line at the end of all data. I can live with that!
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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