+ Reply to Thread
Results 1 to 4 of 4

Macro merge cells separated by comma, ignore blank cells

  1. #1
    Registered User
    Join Date
    07-28-2013
    Location
    Athens
    MS-Off Ver
    Excel 2010
    Posts
    55

    Wink Macro merge cells separated by comma, ignore blank cells

    Finally i have found a solution with this formula:
    Please Login or Register  to view this content.

    Ok this is the new macro that works:
    Please Login or Register  to view this content.
    info
    This Macro Merge Columns T,U,V,W,X,Y,Z,AA,AB,AC into AD Column and separates values by comma and ignores blank cells. After that it copies the results into AE Column and deletes the unnecessary Columns. So when the macro executes completely you have all this Columns merged into T Column
    Heres an example:
    IMAGE_1 IMAGE_2 IMAGE_3 MERGED_IMAGES
    myimage1.jpg myimage2.jpg myimage3.jpg myimage1.jpg,myimage2.jpg,myimage3.jpg
    myimage1_b.jpg myimage2_b.jpg myimage3_b.jpg myimage1_b.jpg,myimage2_b.jpg,myimage3_b.jpg
    myimage1_c.jpg myimage2_c.jpg myimage3_c.jpg myimage1_c.jpg,myimage2_c.jpg,myimage3_c.jpg

    PS!!!

    I have found a second problem, after the macro executes i have found some cells with an unneeded comma in the end of the cell value.
    So i have create a second macro to fix that problem with the macro recorder and this formula
    Please Login or Register  to view this content.
    You can change the formula to whatever you want, eg if you want to remove the "w" character in the end of the value of A2 cell you can change the formulla like this:
    Please Login or Register  to view this content.
    Last edited by lagiosman; 01-26-2014 at 01:00 PM.
    ~Our technology has exceeded our humanity~

  2. #2
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: Macro merge cells separated by comma problem

    Hi lagiosman,

    I work much better if I have an example spreadsheet (with the current macros). If you can post an e3xample of what you have and what you are looking to see as the result i will have a look and see if I can help

    jmac

  3. #3
    Registered User
    Join Date
    07-28-2013
    Location
    Athens
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Macro merge cells separated by comma problem

    Quote Originally Posted by jmac1947 View Post
    Hi lagiosman,

    I work much better if I have an example spreadsheet (with the current macros). If you can post an e3xample of what you have and what you are looking to see as the result i will have a look and see if I can help

    jmac
    Thank you for your interest my friend

    I have write a new macro and now it works, i have update my original post.
    Last edited by lagiosman; 01-16-2014 at 08:10 PM.

  4. #4
    Registered User
    Join Date
    01-21-2014
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Macro merge cells separated by comma, ignore blank cells

    Tried it myself, I needed to merge text from a column into a cell separating them with a comma. Thanks!!

+ 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. Macro that can merge a column of cells into one cell separated by semi colon
    By glide2131 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-25-2013, 05:23 PM
  2. [SOLVED] Macro to match values in cells separated by semicolon and comma
    By Ale84 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-21-2013, 11:00 PM
  3. Replies: 8
    Last Post: 01-29-2010, 09:31 AM
  4. Replies: 3
    Last Post: 05-10-2005, 04:06 PM
  5. [SOLVED] How do i merge data in a row of cells to be comma separated in on.
    By Banana in forum Excel General
    Replies: 1
    Last Post: 02-07-2005, 02:06 PM

Tags for this Thread

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