+ Reply to Thread
Results 1 to 10 of 10

COUNT formula that will use multiple criteria to sum how many targets have meet met

  1. #1
    Registered User
    Join Date
    09-28-2021
    Location
    London, England
    MS-Off Ver
    Microsoft 365 Apps for Enterprise
    Posts
    4

    COUNT formula that will use multiple criteria to sum how many targets have meet met

    Hi all, I've been stuck trying to write a formula that will count if monthly customer contact targets are being met.
    I currently have two conditional formatting rules in place which highlight if the targets are met or not.

    My aim is to calculate the number of occurrences targets are either met or not.

    The data is similar to this dummy version:

    Monthly Targets.png

    The conditional formatting rule that highlights targets not being met is: = AND(VALUE($H3) = VALUE(B$2) , VALUE(B3) > VALUE($G3))
    This first identifies which Month column to look at, using the Target Months column; it will then highlight if the number of calls is less than the target calls for that client.

    The correct COUNT numbers should be: 2 targets not met & 5 targets met. TIA!
    Attached Files Attached Files
    Last edited by ArcticFoxes; 09-28-2021 at 05:42 PM. Reason: Added sample workbook

  2. #2
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: COUNT formula that will use multiple criteria to sum how many targets have meet met

    Welcome to the forum

    The easy way would be to add a new column I:I titled "Met?" and populate it with your CF formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Then simply =countifs(I3:I7, "TRUE") and =countifs(I3:I7, "FALSE")

    BTW are the value() calls really necessary? Are all your cells text rather than numbers??

    If this is not what you are looking for then please upload a sample workbook per the instructions in the yellow banner at the top of the thread.
    Geoff

    Did I help significantly? If you wish, click on * Add Reputation to say thanks.
    If your problem has been resolved please select ?Solved? from the Thread Tools menu

  3. #3
    Registered User
    Join Date
    09-28-2021
    Location
    London, England
    MS-Off Ver
    Microsoft 365 Apps for Enterprise
    Posts
    4

    Re: COUNT formula that will use multiple criteria to sum how many targets have meet met

    Hi Geoff, thanks for the response.

    The problem is that it would require 5 columns for each month and the number of rows exceeds 5000.

    I had to add the VALUE() calls as some of the cells are automatically filled in as text (01 or 1 etc.), maybe there is a more elegant way of solving this issue.

    I've attached a sample worksheet if that helps explain the issue a bit better.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,716

    Re: COUNT formula that will use multiple criteria to sum how many targets have meet met

    There is no workbook attached.

    EDIT: There is now!
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: COUNT formula that will use multiple criteria to sum how many targets have meet met

    OK, 1 helper column:

    In J3 copied down to J9:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Then in H13:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    And H14:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    See attached update to your workbook
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: COUNT formula that will use multiple criteria to sum how many targets have meet met

    Geoff, your formula for J3 will not work properly for 6th and 12th months because there is no continuous count of months in row 2.

  7. #7
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    3,201

    Re: COUNT formula that will use multiple criteria to sum how many targets have meet met

    Since you are using 365, you should be able to use these formulas:

    To get the targets met, try this:

    =SUMPRODUCT((Table1[[1]:[12]]>=Table1[Target Calls])*(Table1[Target Months]=VALUE(Table1[[#Headers],[1]:[12]])))

    To get the No Met, try:

    =SUMPRODUCT((Table1[Target Months]=VALUE(Table1[[#Headers],[1]:[12]]))*(Table1[[1]:[12]]< Table1[Target Calls]))

    This matches the amounts you gave, but as a note, I believe you may have part of the criteria backwards for the NOT MET - to get 2 as the answer, the number inside the grid needs to be LESS THAN the Target Calls, not Greater than.

  8. #8
    Registered User
    Join Date
    09-28-2021
    Location
    London, England
    MS-Off Ver
    Microsoft 365 Apps for Enterprise
    Posts
    4

    Re: COUNT formula that will use multiple criteria to sum how many targets have meet met

    Thanks for the solution! It works well for the sample, however when I try and write the formula for my actual data set it returns 0 for the met and just the number of rows for the no met.

    I've added another sample workbook with data formatted like in my actual data set. I'm not able to rename the actual table headers, as they are pulled from a main database, so instead the months 1-12 are referenced in the row above the headers.

    I didn't fully explain my aim in the original post, as I also want to separate the target counts by salesperson. I'll update if I can get it working
    Attached Files Attached Files
    Last edited by ArcticFoxes; 09-29-2021 at 05:10 AM.

  9. #9
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: COUNT formula that will use multiple criteria to sum how many targets have meet met

    Sales call target is also text , so you need to do the same thing as you did with Enqfreq target

    = SUMPRODUCT((Table_Query_from_DB[[ThisMth]:[12Mth]]>=VALUE(Table_Query_from_DB[SalesCallsTgt]))*(VALUE(Table_Query_from_DB[EnqFreqTgt])=VALUE(B4:F4)))

    otherwise all your first condition is false

  10. #10
    Registered User
    Join Date
    09-28-2021
    Location
    London, England
    MS-Off Ver
    Microsoft 365 Apps for Enterprise
    Posts
    4

    Thumbs up Re: COUNT formula that will use multiple criteria to sum how many targets have meet met

    Amazing! I also filtered it by salesperson by adding in an extra condition

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


    Thank you everyone for the assistance, I learnt a lot along the way
    Last edited by AliGW; 09-29-2021 at 09:03 AM. Reason: PLEASE don't quote unnecessarily!

+ 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 values that meet multiple criteria
    By anandis in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-15-2021, 09:20 AM
  2. count formula for unique ids that meet multiple criteria
    By fgbdrum in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-02-2020, 03:43 AM
  3. [SOLVED] Formula to count number of occurrences that meet multiple criteria
    By Losguapos1 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-13-2018, 07:38 AM
  4. [SOLVED] Need to count repeated names only once that meet multiple criteria
    By steeler11111 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 12-10-2015, 12:20 PM
  5. How to count cells that meet multiple criteria, leaving out duplicates
    By jsgray in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-11-2013, 07:26 AM
  6. Using SUM to count cells that meet multiple criteria
    By cricket_stoner in forum Excel General
    Replies: 10
    Last Post: 05-31-2010, 06:01 AM
  7. Count records that meet multiple criteria
    By statenja in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-24-2008, 01:53 AM

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