+ Reply to Thread
Results 1 to 10 of 10

Return unique values based on another column's value

  1. #1
    Forum Contributor
    Join Date
    12-31-2008
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    149

    Return unique values based on another column's value

    Hi,

    Please see attached.

    In column F I have values YES or NO, and in column A, I have a list of other values - from row 1 to 20.

    I want to see the 4 values in column H because the value in column F is yes. There will always be 6 rows (in this test data) and I'd like if possible the values in column H to update automatically if the value in column F changes (ie : from yes to no)

    Is this possible?

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Return unique values based on another column's value

    Sure can!

    Put this in cell H1:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And then copy it downwards.

  3. #3
    Forum Contributor
    Join Date
    12-31-2008
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: Return unique values based on another column's value

    Quote Originally Posted by daffodil11 View Post
    Sure can!

    Put this in cell H1:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And then copy it downwards.
    Thanks for your suggestion, but that just copies yes values to the right. I'm looking for a condensed list, like in my example.

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Return unique values based on another column's value

    Yes, with rank, match, and index.

    We assign a value to yes and no, then we rank them, somewhere else we can count the number of Yes cells, and count backwards from that number and looking up just those cells that correspond.rank-match-index-autosort.xls

  5. #5
    Forum Contributor
    Join Date
    12-31-2008
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: Return unique values based on another column's value

    Quote Originally Posted by daffodil11 View Post
    Yes, with rank, match, and index.

    We assign a value to yes and no, then we rank them, somewhere else we can count the number of Yes cells, and count backwards from that number and looking up just those cells that correspond.Attachment 252922
    That's pretty close -thank you. However, in the results column O, there is the value dog, where I would expect to see mouse. Any ideas why this may be?

  6. #6
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Return unique values based on another column's value

    It's ordering them of no particular value. I'm not sure how I would preserve the original order using rank.

    I will think upon it.

  7. #7
    Forum Contributor
    Join Date
    12-31-2008
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: Return unique values based on another column's value

    Quote Originally Posted by daffodil11 View Post
    It's ordering them of no particular value. I'm not sure how I would preserve the original order using rank.

    I will think upon it.
    Excellent, I'll keep an eye on the thread.

    It's a shame Excel doesn't have a Filter function similar to Google Docs.

  8. #8
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Return unique values based on another column's value

    I'll create a macro filter for you. I use them on our Excel based knowledge bases. Give me 15 minutes.

  9. #9
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Return unique values based on another column's value

    Enter a word to search A1:F6. Click Filter.

    pets-filtermacro.xlsm

  10. #10
    Forum Contributor
    Join Date
    12-31-2008
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: Return unique values based on another column's value

    Quote Originally Posted by daffodil11 View Post
    Enter a word to search A1:F6. Click Filter.

    Attachment 252954
    Thanks for your help.

+ 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] Sum Unique Values Based on Other Column Criteria
    By jfist85 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-06-2013, 03:21 PM
  2. Select multiple criteria based on check box selection and return all unique values.
    By TommyToe in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-21-2013, 09:14 AM
  3. [SOLVED] Filtering and generating new tabs based on Unique values based in column
    By amlan009 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-02-2012, 09:40 PM
  4. Find unique value in column and return multiple values
    By DWolf75 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2011, 08:32 PM
  5. Count unique values based on another column
    By verdugan in forum Excel General
    Replies: 4
    Last Post: 07-02-2009, 12:21 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