+ Reply to Thread
Results 1 to 4 of 4

Multiple Columns which need to be combined with some columns not having all the cells fill

  1. #1
    Registered User
    Join Date
    04-24-2014
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2003
    Posts
    5

    Multiple Columns which need to be combined with some columns not having all the cells fill

    Okay here is a doosy....At least for me. I have a spreadsheet with 10 columns which are for tags for products. Some columns are filled in for 10 products and some are not. For instance, product 1 has 7 tags while product 2 has only 2 tags and so on. Now what I am looking to do is combine all the tags for each product with a "," inbetween each one. The problem is if I just use a simple =A2&","&B2&","&C2 etc formula is that if there are only 2 tags then I get 8 ","s. I also tried it with an IF statement but by the time I was done nesting items I became cross eyed and said there has to be an easier way to do this.

    I have create a spreadsheet with the data and the result that I typed into the "result" column.

    Any help would be appreciated.

    Thanks

    Mike
    Attached Files Attached Files
    Last edited by kikboxr777; 04-30-2014 at 01:26 AM.

  2. #2
    Forum Contributor
    Join Date
    01-25-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    434

    Re: Multiple Columns which need to be combined with some columns not having all the cells

    hmmm

    i tried to avoid the nested if's too, but ended up with this insted

    Please Login or Register  to view this content.
    what it's doing is putting a comma in-between each value, but then using the replace function to remove double commas, then if what's left ends with a comma it removes the final comma

    if i think of a simpler alternative method i'll let you know

  3. #3
    Registered User
    Join Date
    04-24-2014
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2003
    Posts
    5

    Multiple Columns which need to be combined with some columns not having all the cells fill

    @ThirtyTwo

    Wow......That did the trick....Wasn't even close to the abomination that I created. I'm going to go and flush mine down the toilet and just use yours! Thank you.

    I did have to add a couple of &"," in between a couple because it missed one in between two particular cells so I''l repost it with the fix so someone else can use it:

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    01-25-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    434

    Re: Multiple Columns which need to be combined with some columns not having all the cells

    glad to have helped, but like you, i wasn't expecting a formula for the solution to be so long or look so messy, but it works, and that's the main thing, it provided a fix for what you needed

+ 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. Moving blocks of columns to a combined list of columns
    By kbodway in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-15-2013, 01:17 PM
  2. [SOLVED] Transpose 2 Columns into Multiple Columns per Range of Cells
    By ub3rm0nk3y in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2013, 02:30 PM
  3. [SOLVED] VBA fill in cells in a new column in table based on multiple criteria from other columns
    By HRA in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-14-2013, 06:48 AM
  4. Multiple Columns to Two Columns and then fill down data to end
    By LVernon in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-14-2012, 11:08 AM
  5. Multiple stacked columns combined with a line graph
    By rkd1979 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-23-2010, 08:00 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