+ Reply to Thread
Results 1 to 6 of 6

Duplicated A column cells- Concatenate B Column?

  1. #1
    Registered User
    Join Date
    01-29-2008
    Posts
    4

    Duplicated A column cells- Concatenate B Column?

    I have a spreadsheet with sku's in Column A. Some are duplicated 3-4 times, others are used only once.
    In column B I have the sku's description. For those with multiple instances in Column A they have different descriptions in Column B.

    I would like to automatically find duplicate Column A cells and then have it Concatenate the Column B cells to the first instance of the Column A sku number.

    I found an answer using the MCONCAT (http://www.excelforum.com/showthread...t=Concatenate).

    Problem is that this answer requires me to manually enter each sku number, as in "D1", (if I understand it correctly).

    I have 6500 different sku numbers. Too many for that answer.

    Any other ways to automate this?

    I'm not all that "techie". A new pup still learning to walk.

    Thanks!!!!

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    How about building your own function to perform the concatenation.

    In excel, press ALT F11.
    Go Insert, Module, and paste in the code
    Please Login or Register  to view this content.
    Shut down the Visual Basic Editor that was opened.

    Now if your sku is in column A in the range A1:A10 with your descriptions in column B then
    C1: =IF(COUNTIF($A$1:A1,A1)=1,myfunc($A$1:$A$10,A1),"")
    Copy down from C1 to C10.

    Should give you the concatenated, comma separated descriptions for the first appearance of the sku.

    HTH

    rylo

  3. #3
    Registered User
    Join Date
    01-29-2008
    Posts
    4
    Not sure what I'm doing wrong. Mostly Greek to me but I can follow instructions.
    When I put =IF(COUNTIF($A$1:A1,A1)=1,myfunc($A$1:$A$10,A1),"" )
    into C:1 and then copy down to C:10 all that happens is the formula gets put into the cell and does not concantate the cells.

    I read up on formulas and believe I am doing the VBA correctly (just paste what you have and exit from File).

    To reitierate:
    I have a sku number in Column A. Some singular instances, some repetitive.
    Column B contains written descriptions of products. If Column A is a duplicated number the Column B description is NOT duplicated but is different.

    Column C should concantate the descriptions of Column B of all duplicated numbers in Column A, and bring the concantated descriptions into C: of the first instance of the Column A sku number.

    Sorry guys, I feel like a fifth grader taking a Calculas exam in college here. Excel isn't my thing even though I recognize its immense power. Getting this down would save me hours of time.

    Thanks in advance,
    Stan

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Stan

    Have a looked at the attached file.

    rylo
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-29-2008
    Posts
    4
    Rylo, I owe you one BIG steak dinner!!!!

    Caught what I wasn't doing which was not updating the row =IF(COUNTIF($A$1:A2,A2)=1,myfunc($A$1:$A$50,A2),"" ) number to get to the lines that duplicated. Also I wasn't refreshing the data to catch the Function.

    I have to use this spreadsheet to upload to a shopping cart. Still have to check for a few oddities. One is whether the Product Description field will "auto wrap" the desription to fit the available screen size. Some of these product description get BIG.

    If it doesn't then I need to figure out how to insert a "<BR>" ever so many characters to force a wrap so the description doesn't go on for eternity on only one line.

    I'll get back to you on where to send that steak dinner!

    THANKS!!!!!!!!!!!!!!!!!!

  6. #6
    Registered User
    Join Date
    01-29-2008
    Posts
    4
    Rylo, please contact me here:
    grnkeepers1ATinsightbbDOTcom

    Thanks!
    Last edited by rylo; 02-07-2008 at 04:42 AM.

+ 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