+ Reply to Thread
Results 1 to 10 of 10

Adding line break

  1. #1
    Forum Contributor
    Join Date
    12-11-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    517

    Adding line break

    Hi, how to add a line break so the values are in the same cell showing vertically. This is the code im using but it doesnt seem to work. Thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Adding line break

    Hi biznez, could you add an example workbook for this?

  3. #3
    Forum Contributor
    Join Date
    12-11-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    517

    Re: Adding line break

    Quote Originally Posted by berlan View Post
    Hi biznez, could you add an example workbook for this?
    Hi Berlan, here is a sample. I just had to change the code around to reflect the sample file. Thanks
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Adding line break

    Thanks for providing an example. In the code in #1, try changing
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Would that work?

  5. #5
    Forum Contributor
    Join Date
    12-11-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    517

    Re: Adding line break

    Quote Originally Posted by berlan View Post
    Thanks for providing an example. In the code in #1, try changing
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Would that work?
    no that did not work

  6. #6
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Adding line break

    For your example workbook, you could also try a formula alternative:
    Please Login or Register  to view this content.
    Let me know if that would do the trick.

    Key thing, if I understand your question, is to include the char(10) for a new line between the values from Col. A and B, provided that you have enabled the "wrap text" property.

  7. #7
    Forum Contributor
    Join Date
    12-11-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    517

    Re: Adding line break

    Quote Originally Posted by berlan View Post
    For your example workbook, you could also try a formula alternative:
    Please Login or Register  to view this content.
    Let me know if that would do the trick.

    Key thing, if I understand your question, is to include the char(10) for a new line between the values from Col. A and B, provided that you have enabled the "wrap text" property.
    for example...basically this is how i want it to display in cell F1 using code


    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Adding line break

    Ok, understood. For the example workbook, now try:
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    12-11-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    517

    Re: Adding line break

    Quote Originally Posted by berlan View Post
    Ok, understood. For the example workbook, now try:
    Please Login or Register  to view this content.
    Thats exactly what i wanted...thank you so much!! now i have to understand your code

  10. #10
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Adding line break

    You're welcome, and thanks for the rep

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 12
    Last Post: 06-22-2016, 01:11 PM
  2. Copy pasting from Excel issue - NEW LINE/LINE BREAK
    By denneboom in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-10-2012, 10:18 AM
  3. Copy pasting from Excel issue - NEW LINE/LINE BREAK
    By denneboom in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 09-07-2012, 06:41 AM
  4. Copy pasting from Excel issue - NEW LINE/LINE BREAK
    By denneboom in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-07-2012, 06:40 AM
  5. Adding a Line Break into a Cell
    By Jetheat in forum Excel General
    Replies: 7
    Last Post: 06-28-2010, 07:01 PM
  6. Line Chart Question - break in line for blank cells
    By JonPugh in forum Excel Charting & Pivots
    Replies: 11
    Last Post: 12-09-2009, 09:39 AM
  7. [SOLVED] Break cell into multiple lines by line break
    By Chia in forum Excel General
    Replies: 1
    Last Post: 08-20-2006, 01:40 AM
  8. [SOLVED] line break in a cell-Is there a way to get the line break instead of a symbol?
    By luvgreen in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-14-2005, 02:05 PM

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