+ Reply to Thread
Results 1 to 7 of 7

Need to count Unique Values with multiple criteria

  1. #1
    Registered User
    Join Date
    10-04-2013
    Location
    India
    MS-Off Ver
    Excel 365
    Posts
    24

    Need to count Unique Values with multiple criteria

    Hi,

    As per the sample data attached, I need to count unique "Used Car" by "Jagadheesh" and "Asish" each day.

    Hope you understand Please see the data in sample attached.

    Thanks you
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,247

    Re: Need to count Unique Values with multiple criteria

    Try this:

    =SUMPRODUCT((1/(COUNTIF(Sheet1!$D$2:$D$518,Sheet1!$D$2:$D$518))*(Sheet1!$B$2:$B$518="Jagadeesh")*(Sheet1!$C$2:$C$518=$B3)))

    and this:

    =SUMPRODUCT((1/(COUNTIF(Sheet1!$D$2:$D$518,Sheet1!$D$2:$D$518))*(Sheet1!$B$2:$B$518="Asish")*(Sheet1!$C$2:$C$518=$B3)))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    10-04-2013
    Location
    India
    MS-Off Ver
    Excel 365
    Posts
    24

    Re: Need to count Unique Values with multiple criteria

    Hi AliGW,

    I have tried the formula, it's working for 1st date i.e. 01-May-2021. For rest all dates not giving correct result. Showing in Decimals.
    Please check the attached sample data.

    Please suggest further.

    Thank you
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,101

    Re: Need to count Unique Values with multiple criteria

    Try this ordinary (NOT an array) formula:

    =SUM(INDEX((Sheet1!$C$2:$C$518=$B3)*(Sheet1!$B$2:$B$518=C$2)/COUNTIFS(Sheet1!$C$2:$C$518,Sheet1!$C$2:$C$518&"",Sheet1!$B$2:$B$518,Sheet1!$B$2:$B$518&"",Sheet1!$D$2:$D$518,Sheet1!$D$2:$D$518&""),0))
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 06-19-2021 at 03:09 AM.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  5. #5
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,784

    Re: Need to count Unique Values with multiple criteria

    Sheet2

    C3=SUM(IF(FREQUENCY(IF(Sheet1!$C$2:$C$518=Sheet2!$B3,IF(Sheet1!$B$2:$B$518=TRIM(SUBSTITUTE(Sheet2!C$2,"Count of","")),MATCH(Sheet1!$D$2:$D$518,Sheet1!$D$2:$D$518,0))),ROW(Sheet1!$B$2:$B$518)-ROW(Sheet1!$B$2)+1),1))

    CONTROL+SHIFT+ENTER

    Copy across and down

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,247

    Re: Need to count Unique Values with multiple criteria

    Quote Originally Posted by prasademany View Post
    I have tried the formula, it's working for 1st date i.e. 01-May-2021. For rest all dates not giving correct result. Showing in Decimals.
    Please check the attached sample data.
    Hahaha! Well, it was a guess, since you didn't bother to include any manually calculated results in your sample workbook ...

  7. #7
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,469

    Re: Need to count Unique Values with multiple criteria

    worksheet name : sheet2
    cell C3 array formula , Drag down and across

    HTML Code: 
    Last edited by wk9128; 06-19-2021 at 06:10 AM.

+ 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. Count unique values with multiple criteria
    By thomasuponor in forum Excel General
    Replies: 23
    Last Post: 11-02-2020, 11:45 AM
  2. [SOLVED] Count unique values with multiple criteria
    By Delta729 in forum Excel General
    Replies: 2
    Last Post: 10-01-2017, 08:41 PM
  3. [SOLVED] Count unique values with multiple criteria
    By jake1912 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-27-2017, 01:15 AM
  4. Count Unique Values with multiple criteria
    By TotallyLost in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-04-2015, 10:24 AM
  5. Count Unique Values for Multiple Criteria
    By timjs in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-03-2015, 10:09 AM
  6. 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
  7. Count Unique Values with Multiple Criteria
    By JohnV in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-17-2006, 01:10 PM

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