+ Reply to Thread
Results 1 to 5 of 5

Count unique values for a particular criteria

  1. #1
    Registered User
    Join Date
    05-24-2017
    Location
    Haryana, India
    MS-Off Ver
    MS Office 2007
    Posts
    16

    Count unique values for a particular criteria

    Respected Experts,

    I have attached a sample workbook where I want to count unique same values in column B against each unique item in column C. I have given expected answer in the same sheet for proper understanding.
    Attached Files Attached Files

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Count unique values for a particular criteria

    Firstly I cut down your sample to 10,000 rows to make the file a bit smaller so I could re-attach it.

    I then created a helper column in your source data that picks out the first unique entry in the V Column and gives it a "1" result, any subsequent matches will give "0" result.

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


    I then created a pivot table that sums the helper column to give the discrete count of V.
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,278

    Re: Count unique values for a particular criteria

    Apply the array formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,513

    Re: Count unique values for a particular criteria

    ARRAY Formulas
    For M in ROW 3 then drag down.
    Please Login or Register  to view this content.
    For V in ROW 3 then drag down.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,513

    Re: Count unique values for a particular criteria

    The previous functions given takes more time. Here is faster solution

    In G3
    =MIN('sample data'!$C$3:$C$71111)

    In G4
    =INDEX('sample data'!$C$3:$C$71111,MATCH(G3,'sample data'!$C$3:$C$71111,1)+1)

    In H3 . Even though this formula is bit long It is faster.
    Please Login or Register  to view this content.
    Drag Formulas in G4 and H3 down.
    Attached Files Attached Files

+ 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 text values with criteria
    By andrugrasu in forum Excel General
    Replies: 11
    Last Post: 09-10-2017, 08:35 AM
  2. Count unique values if criteria met within 2 columns
    By geegeesmith in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-21-2017, 06:57 AM
  3. [SOLVED] Count if unique values with criteria
    By adamsfarley in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-05-2016, 10:12 AM
  4. [SOLVED] Count unique values if 2 other criteria are met
    By sted999 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-30-2014, 11:53 AM
  5. Count Unique Values, but with multiple criteria
    By the northern monkey in forum Excel General
    Replies: 3
    Last Post: 02-02-2012, 07:45 AM
  6. Count Unique Values with criteria
    By mashley in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-08-2010, 02:00 PM
  7. Count unique values with criteria
    By benno87 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-03-2008, 11:13 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