+ Reply to Thread
Results 1 to 4 of 4

COUNT number of unique values in column A, based on criteria matching columns B and C

  1. #1
    Registered User
    Join Date
    08-11-2017
    Location
    uk
    MS-Off Ver
    2013
    Posts
    2

    Question COUNT number of unique values in column A, based on criteria matching columns B and C

    Hi Everyone

    I have 3 columns as follows

    A B C
    1 x yes
    2 stock no
    2 future yes
    2 future yes
    3 x no
    4 x yes
    4 stock yes
    5 future yes
    5 x yes
    5 future no
    5 future yes

    I want a formula to count the number of unique values in column A where column B is "future" and column C is "Yes"

    So the answer in this example would be 2, because only numbers 2 and 5 have any instances of "future" AND "yes" in columns B and C.

    Any help would be hugely appreciated.... it needs to be automated to feed graphs, so unfortunately a pivot table won't suffice.

    Many thanks in advance

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: COUNT number of unique values in column A, based on criteria matching columns B and C

    Try Below array formula

    =SUM((FREQUENCY(IF((B2:B12="Future")*(C2:C12="Yes"),A2:A12),A2:A12)>0)+0)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: COUNT number of unique values in column A, based on criteria matching columns B and C

    or try
    =SUMPRODUCT((B1:B12="Future")*(C1:C12="Yes")/COUNTIFS(A1:A12,A1:A12,B1:B12,B1:B12,C1:C12,C1:C12))

  4. #4
    Registered User
    Join Date
    08-11-2017
    Location
    uk
    MS-Off Ver
    2013
    Posts
    2

    Re: COUNT number of unique values in column A, based on criteria matching columns B and C

    Thanks this worked a treat.

    =SUM((FREQUENCY(IF((B2:B12="Future")*(C2:C12="Yes"),A2:A12),A2:A12)>0)+0)

+ 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. Replies: 2
    Last Post: 11-21-2014, 12:59 PM
  2. Count Unique Values Matching Criteria from Other Column
    By jsharrard in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-20-2013, 05:56 PM
  3. Count unique values in columns based on 2 criteria (error in one result)
    By t83357 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-17-2013, 03:25 PM
  4. [SOLVED] Count unique values in columns based on 2 criteria
    By t83357 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-12-2013, 04:33 PM
  5. Count Unique Values with Matching Criteria in another Column
    By mjthornicroft in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-30-2013, 06:51 AM
  6. Replies: 11
    Last Post: 06-09-2011, 03:17 PM
  7. Count unique values based on matching criteria
    By gromitw in forum Excel General
    Replies: 9
    Last Post: 01-10-2007, 08:59 AM

Tags for this Thread

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