+ Reply to Thread
Results 1 to 6 of 6

Enter multiple lines with chr(10) based on cells

  1. #1
    Registered User
    Join Date
    06-22-2015
    Location
    Malaysia
    MS-Off Ver
    2013
    Posts
    17

    Talking Enter multiple lines with chr(10) based on cells

    Good day to all VBA experts!

    I am facing a problem in creating a macro for my own work, which I've tried several ways by using for loop, but end up a bunch of mess.

    My problem is, let's say I have multiple distinct members (A,B,C,D,E,F) at column B, where each member has different numbers associated with it on column C.

    I would like to have my result shown on the right hand side in below picture, where I wish to make the numbers to be combined to a single cells with a newline chr(10) for each members from column B.

    May I know is there any way that I can achieve it?

    Appreciate any codes that can make this possible!

    Cheers!


    VBA.JPG

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Enter multiple lines with chr(10) based on cells

    Try this code
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Enter multiple lines with chr(10) based on cells

    Hi Allmaths,
    try this
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-22-2015
    Location
    Malaysia
    MS-Off Ver
    2013
    Posts
    17

    Re: Enter multiple lines with chr(10) based on cells

    Quote Originally Posted by YasserKhalil View Post
    Try this code
    Please Login or Register  to view this content.
    Quote Originally Posted by nilem View Post
    Hi Allmaths,
    try this
    Please Login or Register  to view this content.

    Thanks to both YasserKhalil and nilem!

    Both of the codes work like a charm!

    I am still weak at array, so might need to read more to understand the codes.

    Once again, thanks! Really appreciate it!

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Enter multiple lines with chr(10) based on cells

    You're welcome. Thanks for the feedback
    Glad I can offer some help

  6. #6
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,513

    Re: Enter multiple lines with chr(10) based on cells

    What mean
    Please Login or Register  to view this content.
    How if i am change to is similar
    Please Login or Register  to view this content.
    Thank nilem

+ 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: 1
    Last Post: 05-06-2016, 08:22 PM
  2. [SOLVED] enter text based on search of multiple cells
    By akamexcel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-04-2015, 04:47 PM
  3. [SOLVED] Find matching lines based on multiple criteria
    By Jonathan68 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-13-2014, 06:04 PM
  4. Allowing Multiple Lines Per Cell Without Alt+Enter
    By nicole3579 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-14-2014, 02:55 PM
  5. Replies: 1
    Last Post: 08-06-2012, 12:14 PM
  6. Create multiple lines based upon criteria
    By SystemsAccountant in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-05-2008, 01:14 PM
  7. [SOLVED] how do I enter multiple lines in a cell in Excel
    By asowles in forum Excel General
    Replies: 2
    Last Post: 02-03-2005, 04:06 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