+ Reply to Thread
Results 1 to 7 of 7

Count unique text values using criteria

  1. #1
    Registered User
    Join Date
    09-12-2012
    Location
    Richmond, Virginia
    MS-Off Ver
    Excel 2007
    Posts
    10

    Count unique text values using criteria

    In the attached spreadsheet I need to count the number of unique providers (a text field) for each reviewer (C5 & C6). Named ranges are: demo_Reviewer (J4:J14) & demo_Provider (L4:L13). I know how to count unique providers by formula but need to add reviewer as a criteria so that I get an unique count per reviewer.
    Attached Files Attached Files

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Count unique text values using criteria

    Using your posted workbook, this regular formula returns the count of unique Providers for the referenced Reviewer
    Please Login or Register  to view this content.
    • Adjust the range references to suit your actual data

    • Copy that formula down as far as you need.

    Oh...and turn the Excel calculation mode for your workbook to Automatic (if you want to see the latest actual calculated values)

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    09-12-2012
    Location
    Richmond, Virginia
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Count unique text values using criteria

    Thanks. Certainly something I can work with. I can dynamically code the ranges/formula in VBA, but how can I use named ranges in your formula? I've tried several ways but all give me zero as result.

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Count unique text values using criteria

    Can you post an example formula that uses named ranges, so we can see what you're attempting?

  5. #5
    Registered User
    Join Date
    09-12-2012
    Location
    Richmond, Virginia
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Count unique text values using criteria

    Look in the Summary Table in spreadsheet - col D-> H

  6. #6
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Count unique text values using criteria

    Got it...try this regular formula in your workbook:
    Please Login or Register  to view this content.
    Does that solve the problem?

  7. #7
    Registered User
    Join Date
    09-12-2012
    Location
    Richmond, Virginia
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Count unique text values using criteria

    Yes it does! Thanks again. Excel auto-corrected the formula as below. Only difference I can see is a space after "INDEX(1/" that looks like it was removed...

    =COUNT(INDEX(1/((MATCH(B5&"_"&demo_Providers,demo_Reviewer&"_"&demo_Providers,0)=(ROW(demo_Reviewer)-MIN(ROW(demo_Reviewer))+1))),0))

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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