+ Reply to Thread
Results 1 to 7 of 7

COUNTIFS with multiple criteria

  1. #1
    Registered User
    Join Date
    02-05-2013
    Location
    Georgia
    MS-Off Ver
    Excel 2007
    Posts
    20

    COUNTIFS with multiple criteria

    I need help trying to figure out a count formula. I’m tracking employee’s errors by date. The sheet where the data is at is named Annex Data. The formula will be on the sheet named Error Dashboard column “N” row 6. Here is what I need the formula to do.

    I need it to count the number errors the employee had for a given date i.e. 8/18/15 by employee initials. It then needs to exclude the count if the corrected date in column M is #N/A or blank. I think it would something like this formula but I’m missing several pieces. =COUNTIFS('Annex Data'!$J:$J,"FAL01",'Annex Data'!$B:$B,$n$4).

    1. Annex Data Column “B” contains the date the error was made
    2. Annex Data Column “I” contains the employee initials i.e. “FAL01”
    3. Annex Data Column “J” contains different codes i.e. Employee Error, Vendor Error, Accounting Error etc...
    4. Annex Data Column “M” is the date the error was corrected
    5. Error Dashboard N6 will contain the formula needed for above results
    6. Error Dash board N4 contains a date i.e. 8/18/15

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: COUNTIFS with multiple criteria

    =COUNTIFS('Annex Data'!B:B,$N$4,'Annex Data'!I:I2,$I$2,'Annex Data'!M:M,"<>"&"#N/A",'Annex Data'!M:M,"")
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: COUNTIFS with multiple criteria

    Hi,
    Try this - slightly amended from the formula above :
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    It's best not to include entire columns in such formulae if you can avoid it as this slows the calculation down - select the range you need to check, plus some extra - I've used 1 to 1000.

    Regards,
    Aardigspook

    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark Thread as Solved'.
    You don't need to give me rep if I helped, but thanks are appreciated.

  4. #4
    Registered User
    Join Date
    02-05-2013
    Location
    Georgia
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: COUNTIFS with multiple criteria

    This will not work I'm still missing something almost like an IF statement. Remember I need it to return the criteria if Column "J" is tagged as employee error.

  5. #5
    Registered User
    Join Date
    02-05-2013
    Location
    Georgia
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: COUNTIFS with multiple criteria

    I figured it out. here is the correct formula =COUNTIFS('Annex Data'!$B:$B,$O$4,'Annex Data'!$I:$I,"FAJ01",'Annex Data'!$M:$M,"<>"&"#N/A",'Annex Data'!$M:$M,"<>"&"",'Annex Data'!$J:$J,"Employee"). Turns out I needed to add ,'Annex Data'!$J:$J,"Employee" at the end of the formula. Thank you all for the help and guidance.

  6. #6
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: COUNTIFS with multiple criteria

    Sorry, I missed the need to check for the 'Employee' error. Glad you got it figured out.

    I still recommend you don't check entire columns ($B:$B for example) as that will slow your file down as it gets bigger - your formula as it is is checking 5 x 1048576 = 5,242,880 cells - if you changed to rows 1-1000 ($B1:$B1000 for example) it would only be checking 5000 cells which is 1000 times faster.

    Regards,
    Aardigspook

    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark Thread as Solved'.
    You don't need to give me rep if I helped, but thanks are appreciated.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: COUNTIFS with multiple criteria

    Quote Originally Posted by Aardigspook View Post
    I still recommend you don't check entire columns ($B:$B for example) as that will slow your file down as it gets bigger - your formula as it is is checking 5 x 1048576 = 5,242,880 cells
    Not necessarily.

    COUNTIF(S) is an efficient function.

    If you use entire columns as references the function only calculates the used range. The used range is the actual range of cells that contain data.

    For example, if the data goes down to row 100 then the used range ends at row 100.

    So, these formulas would be equally efficient:

    =COUNTIF(A1:A100,"X")
    =COUNTIF(A:A,"X")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. Countifs with multiple criteria in single criteria range
    By MCP313 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-01-2016, 03:51 AM
  2. [SOLVED] COUNTIFS with multiple criteria in the same criteria range
    By Faridwahidi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-23-2015, 01:04 PM
  3. [SOLVED] countifs statement with multiple criteria for multiple criteria ranges
    By mcdermott2 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-07-2015, 11:48 AM
  4. [SOLVED] Countifs multiple criteria, and 1 criteria Less than & Greater than
    By david gonzalez in forum Excel General
    Replies: 4
    Last Post: 06-30-2014, 10:33 PM
  5. [SOLVED] Countifs with multiple criteria and one criteria has a list of names
    By Beefy1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-30-2014, 05:25 PM
  6. Replies: 0
    Last Post: 07-27-2011, 01:00 AM
  7. Re: CountIFs with multiple criteria
    By antiscripter in forum Excel General
    Replies: 2
    Last Post: 05-05-2011, 11:55 AM

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