+ Reply to Thread
Results 1 to 5 of 5

macro excel merge data from multiple cell rows into single cell

  1. #1
    Registered User
    Join Date
    01-12-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    6

    macro excel merge data from multiple cell rows into single cell

    hi brothers how to merge data from multiple cell rows into single cell using macro in excel
    here i attach workbook to make clear what i want

    thank you
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: macro excel merge data from multiple cell rows into single cell

    I'm interested in the purpose (use) of this action.

    15 A.P. MÖLLER - MAERSK A/S A.P. MOLLER FINANCE SA

    For this item you get such a long line that:
    1) it not easy to read
    2) maybe it is not possible to put it in 1 line (max of char reached for excel).
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: macro excel merge data from multiple cell rows into single cell

    In a spare copy of your file, try this method which uses a sub (credits to Mike H) ..

    In your Before sheet,
    Do a "fill-down-from-above" first to fully populate col B (this is a prerequisite)
    Put in D2: =B2
    Put in D3: =IF(B3="",D2,B3)
    Copy D3 down to last row of data in col B
    Then cut col D and paste special as values to overwrite col B
    (Note that the new col B is now fully populated)

    Now run the sub below to generate the results in cols D and E

    Please Login or Register  to view this content.
    Note: I'm not sure, but you might have a truncation problem in Excel 2003 with this guy: A.P. MÖLLER - MAERSK A/S
    as there's a whole lot of associated data to squeeze into a single cell
    (I tried it in Excel 2007, which I believe has a higher limit per cell)

    ------
    Success? celebrate it, click the star at the bottom left of my response
    Last edited by Max, Singapore; 09-02-2012 at 05:07 AM.

  4. #4
    Registered User
    Join Date
    01-12-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: macro excel merge data from multiple cell rows into single cell

    ok guys thank for respond i'll try it

  5. #5
    Registered User
    Join Date
    01-12-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: macro excel merge data from multiple cell rows into single cell

    Quote Originally Posted by oeldere View Post
    I'm interested in the purpose (use) of this action.

    15 A.P. MÖLLER - MAERSK A/S A.P. MOLLER FINANCE SA

    For this item you get such a long line that:
    1) it not easy to read
    2) maybe it is not possible to put it in 1 line (max of char reached for excel).
    hi what is the code if i want to delete the rest if the character more than 30000

+ 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