+ Reply to Thread
Results 1 to 4 of 4

Countif Distinct and Criteria HELP!!!

Hybrid View

  1. #1
    Registered User
    Join Date
    02-06-2015
    Location
    ny
    MS-Off Ver
    excel 2010
    Posts
    36

    Countif Distinct and Criteria HELP!!!

    Book1.xlsx

    Hi all!!!
    Hello Guys!
    I have a problem in which I need to count unique/ distinct (i dunno which one), values that do not duplicate and have a sold value greater than 0 for a certain month.
    For example on the rows for a particualar month, there is a duplicate item sold, that duplicate would only be counted once as something that has been sold for that month.
    I am trying to do this without a helper column.
    Thanks alot before hand.

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Countif Distinct and Criteria HELP!!!

    Try this Array Formula. Array Formula requires confirmation with Ctrl+Shift+Enter instead of just Enter.

    In G5
    =SUM(IF(FREQUENCY(IF($A$4:$A$22=F5,IF($C$4:$C$22>0,MATCH($B$4:$B$22,$B$4:$B$22,0))),ROW($A$4:$A$22)-ROW($A$4)+1),1))
    and copy down.


    Remember that an Array Formula is confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Countif Distinct and Criteria HELP!!!

    A different method, also an array formula:

    G5:  =SUM(IF(FREQUENCY(IF(($A$4:$A$22=F5)*($C$4:$C$22=1),MATCH($B$4:$B$22,$B$4:$B$22,0)),ROW($B$4:$B$22)-ROW($B$4)+1),1))
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  4. #4
    Registered User
    Join Date
    02-06-2015
    Location
    ny
    MS-Off Ver
    excel 2010
    Posts
    36

    Re: Countif Distinct and Criteria HELP!!!

    Awesome !!!!
    And one for the total?
    Thanks!!!

+ 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] Sum distinct values with two criteria
    By poptcorn in forum Excel General
    Replies: 5
    Last Post: 03-13-2014, 12:09 PM
  2. Distinct COUNTIF
    By TheNewUnion in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-19-2012, 06:27 AM
  3. Formula - Count distinct / Countif??
    By Africa in forum Excel General
    Replies: 3
    Last Post: 02-29-2012, 11:24 AM
  4. Count Distinct Records - Criteria
    By Thommo in forum Excel General
    Replies: 5
    Last Post: 08-24-2009, 05:49 PM
  5. Count distinct values with criteria
    By greencardioid in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-29-2008, 06:48 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