+ Reply to Thread
Results 1 to 4 of 4

[SOLVED] Need to insert line-feed in Excel concatenation (VB)

  1. #1
    Susan W
    Guest

    [SOLVED] Need to insert line-feed in Excel concatenation (VB)

    I want to concatenate values from multiple cells into one cell. I want a
    line-feed separating the values in the combined cell. I tried using the
    ASCII character code (10 for linefeed, 13 for carriage return), but its not
    working the way I did it.

    Any help is greatly appreciated.



  2. #2
    Niek Otten
    Guest

    Re: Need to insert line-feed in Excel concatenation (VB)

    ="a"&CHAR(10)&"b"

    Format>cells>Alignment, check Wrap text

    --
    Kind regards,

    Niek Otten

    "Susan W" <Susan [email protected]> wrote in message
    news:[email protected]...
    >I want to concatenate values from multiple cells into one cell. I want a
    > line-feed separating the values in the combined cell. I tried using the
    > ASCII character code (10 for linefeed, 13 for carriage return), but its
    > not
    > working the way I did it.
    >
    > Any help is greatly appreciated.
    >
    >




  3. #3
    Chip Pearson
    Guest

    Re: Need to insert line-feed in Excel concatenation (VB)

    Susan,

    Try something like

    =A1&CHAR(10)&A2

    or, in VBA

    Range("B1").Value = Range("A1").Value & Chr(10) &
    Range("A2").Value

    Ensure that the cell has Wrap Text enabled (Format menu, Cells,
    Alignment tab).


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com



    "Susan W" <Susan [email protected]> wrote in message
    news:[email protected]...
    >I want to concatenate values from multiple cells into one cell.
    >I want a
    > line-feed separating the values in the combined cell. I tried
    > using the
    > ASCII character code (10 for linefeed, 13 for carriage return),
    > but its not
    > working the way I did it.
    >
    > Any help is greatly appreciated.
    >
    >




  4. #4
    Susan W
    Guest

    Re: Need to insert line-feed in Excel concatenation (VB)

    Yes - the Chr(10) did it. Thanks very much!
    Susan

    "Chip Pearson" wrote:

    > Susan,
    >
    > Try something like
    >
    > =A1&CHAR(10)&A2
    >
    > or, in VBA
    >
    > Range("B1").Value = Range("A1").Value & Chr(10) &
    > Range("A2").Value
    >
    > Ensure that the cell has Wrap Text enabled (Format menu, Cells,
    > Alignment tab).
    >
    >
    > --
    > Cordially,
    > Chip Pearson
    > Microsoft MVP - Excel
    > Pearson Software Consulting, LLC
    > www.cpearson.com
    >
    >
    >
    > "Susan W" <Susan [email protected]> wrote in message
    > news:[email protected]...
    > >I want to concatenate values from multiple cells into one cell.
    > >I want a
    > > line-feed separating the values in the combined cell. I tried
    > > using the
    > > ASCII character code (10 for linefeed, 13 for carriage return),
    > > but its not
    > > working the way I did it.
    > >
    > > Any help is greatly appreciated.
    > >
    > >

    >
    >
    >


+ 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