+ Reply to Thread
Results 1 to 3 of 3

Filter one range and count the associated unique values in another range.

  1. #1
    Registered User
    Join Date
    06-05-2015
    Location
    Accra, Ghana
    MS-Off Ver
    2011 Excel
    Posts
    1

    Filter one range and count the associated unique values in another range.

    First off, I'm a sort of a beginner at excel. I'm trying to extract data from a spread sheet of farmers and the fiscal quarter during which we purchased moringa seeds from them. However there are duplicates of the farmers due to multiple purchases from the same farmer. I'm trying to determine the number of unique farmers we worked with by fiscal quarter, without duplicates. My first approach was a countifs formula and then make the criteria the specific fiscal quarter and aunique formula, but that doesn't work because the second part of the countifs doesn't have two criteria or at least I can't figure out the second criterion. Does anyone have any suggestions?

  2. #2
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Filter one range and count the associated unique values in another range.

    Send a sample file.

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

    Re: Filter one range and count the associated unique values in another range.

    Quote Originally Posted by blastoman334 View Post
    I'm trying to determine the number of unique farmers we worked with by fiscal quarter
    Try this...

    Data Range
    A
    B
    C
    D
    E
    1
    Name
    Quarter
    ------
    Quarter
    Unique Count
    2
    Farmer 2
    Q1
    Q1
    3
    3
    Farmer 2
    Q1
    Q2
    3
    4
    Farmer 3
    Q1
    Q3
    3
    5
    Farmer 5
    Q1
    Q4
    1
    6
    Farmer 2
    Q2
    7
    Farmer 3
    Q2
    8
    Farmer 8
    Q2
    9
    Farmer 8
    Q2
    10
    Farmer 10
    Q3
    11
    Farmer 10
    Q3
    12
    Farmer 2
    Q3
    13
    Farmer 3
    Q3
    14
    Farmer 10
    Q4
    15
    Farmer 10
    Q4


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

    =SUM(IF(FREQUENCY(IF(B$2:B$15=D2,MATCH(A$2:A$15,A$2:A$15,0)),ROW(A$2:A$15)-ROW(A$2)+1),1))

    ** 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.

    I have the data sorted just to make it easier to see what the results should be.
    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 Values in a Range with Condition
    By vij8y in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-28-2015, 05:45 AM
  2. [SOLVED] Count unique values in a range
    By vij8y in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-11-2013, 04:00 PM
  3. Count Unique Values within date range
    By onthepitch in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-20-2012, 02:29 PM
  4. Count Unique Values in Dynamic Range
    By Gos-C in forum Excel General
    Replies: 3
    Last Post: 01-19-2011, 01:20 PM
  5. Replies: 6
    Last Post: 03-31-2009, 11:17 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