+ Reply to Thread
Results 1 to 5 of 5

Formula to get the count of items that satisfy two conditions

  1. #1
    Forum Contributor
    Join Date
    06-26-2012
    Location
    UAE
    MS-Off Ver
    Excel 2003
    Posts
    274

    Formula to get the count of items that satisfy two conditions

    hello,

    please refer the attached worksheet. I would like to get a formula that will give the total number of units sold of a particular product for a particular price .


    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Formula to get the count of items that satisfy two conditions

    Put this formula in K4:

    =SUMPRODUCT(($A$2:$A$22=I4)*($F$2:$F$22=J4),$D$2:$D$22)

    then copy down. Note that it correctly calculates the final example.

    Hope this helps.

    Pete

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Formula to get the count of items that satisfy two conditions

    hi there~ it's been awhile i last saw you. try:
    =SUMPRODUCT($D$2:$D$22,($A$2:$A$22=I4)*($F$2:$F$22=J4))

    but why is "TECNIS TORIC" with unit cost of $740 only 5 units? could you identify which rows they are? i got:
    row 4 (x1), row 20 (x1) & row22 (x4)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Forum Contributor
    Join Date
    06-26-2012
    Location
    UAE
    MS-Off Ver
    Excel 2003
    Posts
    274

    Re: Formula to get the count of items that satisfy two conditions

    hi pete UK and benishriyo.....thanks heaps...it worked like magic

    i am sorry....the expected answers for tencis toric i gave was wrong. u guys are spot on

    it's been a long time benishriyo....

  5. #5
    Forum Contributor
    Join Date
    06-26-2012
    Location
    UAE
    MS-Off Ver
    Excel 2003
    Posts
    274

    Re: Formula to get the count of items that satisfy two conditions

    Thanks Pete and Benishriyo...it worked

    i am sorry the expected answer i gave for tecnis toric was wrong.

    it's been a long time benishiriyo...hope u dont mind be disturbing you with lots of my silly excel doubts very soon

+ 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