+ Reply to Thread
Results 1 to 8 of 8

Combining similar cell contents into a third cell, but only if they match

Hybrid View

  1. #1
    Registered User
    Join Date
    07-18-2013
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    7

    Combining similar cell contents into a third cell, but only if they match

    Hello gurus,
    I was hoping that someone could help me with a formula. I searched for similar issues but am unable to make the solutions work to my advantage.

    Please see attached workbook if it helps. I need to combine the answers given in A2: A6 (dropdowns), and put the corresponding text for that answer into cells E4-E6 respectively.

    In effect summarizing what I liked best, middle and least. I can’t figure out t the nested formula that I will need.
    I’s appreciate some insight if you can share it.

    Hello gurus.jpg

    Thanks,
    Daniel
    Attached Files Attached Files

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Combining similar cell contents into a third cell, but only if they match

    Are you able/open to using a VBA function?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    07-18-2013
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Combining similar cell contents into a third cell, but only if they match

    Hello Tony, not against it but my macro skills have withered. A formula might be easier.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Combining similar cell contents into a third cell, but only if they match

    This VBA function makes it a whole lot easier.

    Copy the VBA code at this link and paste it into a general module:

    https://www.excelforum.com/showthread.php?p=3096647

    Then...

    Data Range
    A
    B
    C
    D
    E
    1
    ------
    ------
    ------
    ------
    ------
    2
    1
    Red
    1
    Red, Blue
    3
    1
    Blue
    2
    Yellow
    4
    2
    Yellow
    3
    Purple, Orange
    5
    3
    Purple
    6
    3
    Orange


    This array formula** entered in E2 and copied down:

    =concatall(IF(A$2:A$6=D2,B$2:B$6,""),", ")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

  5. #5
    Registered User
    Join Date
    07-18-2013
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Combining similar cell contents into a third cell, but only if they match

    Thanks, Tony. I did as you suggested, but no cigar. I put the cod ein to a General tab in 'workbook', if that matters. Should it be in the individual tab's?

    Sorry for the newby questions.

    Thanks again,

    Daniel
    Attached Files Attached Files

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Combining similar cell contents into a third cell, but only if they match

    You put the code in the wrong place.

    I moved it to the correct location. To see where it is...

    ALT F11 will open the VB editor.

    In the Project Explorer pane locate the file name and under it you'll see Module 1.

    Here's the file.
    Attached Files Attached Files

+ 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. [SOLVED] match cell contents using IF, AND to bring in cell contents from another cell in same row
    By summer2010 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-15-2013, 09:12 AM
  2. combining cell contents
    By Canook05 in forum Excel General
    Replies: 4
    Last Post: 05-03-2013, 04:55 PM
  3. Replies: 6
    Last Post: 12-07-2012, 05:38 PM
  4. Combining cell contents
    By grim72 in forum Excel General
    Replies: 1
    Last Post: 07-11-2011, 04:38 AM
  5. delete cell contents with find and replace (or something similar)
    By aaron85 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 07-13-2009, 03:32 AM
  6. Combining a range of cells' contents into 1 cell
    By macrode in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-19-2007, 09:01 AM
  7. Replies: 4
    Last Post: 10-11-2006, 04:46 PM
  8. [SOLVED] Combining cell contents when there is content to combine
    By Richard in forum Excel General
    Replies: 2
    Last Post: 06-21-2006, 02:35 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