+ Reply to Thread
Results 1 to 5 of 5

Sumproduct with multiple criteria - to count numbers greater than zero

  1. #1
    Registered User
    Join Date
    06-06-2013
    Location
    Melbourne
    MS-Off Ver
    2010
    Posts
    4

    Sumproduct with multiple criteria - to count numbers greater than zero

    Hello everyone,

    I am hoping that someone can help me to resolve an issue with counting:

    I have a table that has:
    columns with weekdays 1-7 for 90 day period
    rows with IDs and some of them can be met twice

    I need to count a number of cells that meet criteria ID and weekday but only if the number in the range is greater than zero (if ID was active on that day. It can be active, for example, in one row on 1st, 2nd and 6th Mondays of the period and active in another row on the 4th and 7th Monday etc.).

    The below formula seems to work but it counts zero and blank amounts:
    =SUMPRODUCT(--($CS$6:$CS$5000=CS6)*($D$1:$CO$1=CZ5))

    here D1:CO1 is a columns header with weekday 1 to 7, CZ5 is a given weekday (1 to 7)
    CS6:CS5000 is a column with IDs and CZ6 is an ID to count the activity days for.

    So, is it possible to add another condition to count cells in range D6:CO5000 only if they are greater than zero?

    Appreciate any advice

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,374

    Re: Sumproduct with multiple criteria - to count numbers greater than zero

    Can you please provide a sample workbook?
    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
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Sumproduct with multiple criteria - to count numbers greater than zero

    Hi CoffeeTea and welcome to the forum,

    Would something like this do what you are wanting?
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  4. #4
    Registered User
    Join Date
    06-06-2013
    Location
    Melbourne
    MS-Off Ver
    2010
    Posts
    4

    Re: Sumproduct with multiple criteria - to count numbers greater than zero

    Quote Originally Posted by FlameRetired View Post
    Hi CoffeeTea and welcome to the forum,

    Would something like this do what you are wanting?
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Yes!!! Brilliant!!!!
    Thanks a million FlameRetired!!! You're genius!!!

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Sumproduct with multiple criteria - to count numbers greater than zero

    You're welcome. Thanks for the feedback and rep.

+ 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. Replies: 16
    Last Post: 05-25-2015, 08:51 AM
  2. Count w/multiple criteria across multiple columns - SUMPRODUCT, MATCH?
    By MrHoohah in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-23-2015, 05:23 PM
  3. Replies: 1
    Last Post: 02-21-2014, 09:09 PM
  4. Trying Sumproduct with multiple criteria 1) greater than, or 2) partial text
    By Groovicles in forum Excel Formulas & Functions
    Replies: 24
    Last Post: 08-19-2013, 11:11 AM
  5. [SOLVED] Need to use either COUNTIFS or SUMPRODUCT to count rows based on multiple criteria
    By erabinov in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-15-2013, 03:15 PM
  6. [SOLVED] Sumproduct to count if greater than
    By kevinjay1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-19-2013, 12:29 PM
  7. Replies: 8
    Last Post: 11-05-2009, 04:32 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