+ Reply to Thread
Results 1 to 4 of 4

Array formula to return list of unique items from selected columns only

  1. #1
    Registered User
    Join Date
    01-10-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    5

    Array formula to return list of unique items from selected columns only

    Please help me figure out an array formula to return unique values from certain columns of data.

    The source data is on a sheet with columns labeled for different committee groups, i.e.

    Safety Finance Social
    John Gail Steven
    Betty Mark John
    Bill John Mark
    George Steven

    The same names can appear in one or more committee columns.

    Another sheet includes a user-selected list of committees, populated using data validation from the range of headers on the source data.

    I want to generate a list of unique names included in all of the selected committees. The user could select one or more committees, not necessarily in adjacent columns. The number of columns in the source data will change frequently as committees are formed and disbanded, so the source data would be part of a dynamic named range or table.

    I know how to do an array formula to capture unique names from one column or all columns, but I'm stumped on how to capture from only the selected columns.

    I am attaching an example spreadsheet with example source data and a dummy column of what I want returned.

    Thanks in advance for any advice.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Re: Array formula to return list of unique items from selected columns only

    jlawton1,

    Can't take credit for this, because I found this on another site ages ago.

    On the "Groups" page, run the "unique Data" macro.

    Popup will ask you to input range. To list non-consecutive columns, hold down "Control" as you highlight the cells containing the names in whichever committees you want.

    Key advantage is you can accomodate committees automatically as they are added or disbanded or personnel change.

    Press "OK" and the list will appear in A14 onwards.

    Code as follows:
    Please Login or Register  to view this content.
    Hope this helps

    Ochimus
    Attached Files Attached Files
    Last edited by Ochimus; 03-22-2016 at 09:57 PM.

  3. #3
    Registered User
    Join Date
    01-10-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    5
    Thanks Ochimus,

    I really appreciate your response. However, I was hoping to accomplish this through an array formula or similar method that would not require any manual selection by the user.

    I must admit that my intended actual application of this has nothing to do with personnel or committees. That was just the simplest analogy I could come up with that uses the same logic as my real problem, which is somewhat confidential. The actual data includes several dozen "committee" columns, and over 300 unique "people", so manual range highlighting is not really feasible and too risky for potential errors.

    Thanks again for the suggestion, though.

  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: Array formula to return list of unique items from selected columns only

    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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] Count Unique Items in a Column Based on Unique Items in Two Other Columns
    By HangMan in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 10-31-2015, 04:48 PM
  2. [SOLVED] Store Unique List Of Items In Array
    By NeedForExcel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-12-2015, 04:09 AM
  3. How to combine the selected items of a list and return in a cell
    By 1tane1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2014, 06:37 AM
  4. [SOLVED] Using an array to create a list of selected items
    By Harribone in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-02-2014, 04:40 PM
  5. [SOLVED] Counting # of Unique Items In List & Listing Unique Items In A List
    By unpluggedmusic in forum Excel General
    Replies: 3
    Last Post: 12-05-2012, 11:44 AM
  6. Replies: 10
    Last Post: 01-21-2012, 06:03 AM
  7. Replies: 7
    Last Post: 02-27-2008, 03:53 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