+ Reply to Thread
Results 1 to 6 of 6

Countif with multiple criteria

  1. #1
    Forum Contributor
    Join Date
    02-15-2012
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2019
    Posts
    431

    Countif with multiple criteria

    Hi all,

    Need help in putting countif formula with multiple criteria.

    Excel file attached with necessary details.

    Pl. help.

    Thanks,
    Nagesh.
    Attached Files Attached Files

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

    Re: Countif with multiple criteria

    the countif function can be replaced by countifs which works in virtual l thesame way

    B18
    =COUNTIFS($B$2:$B$8,$A18,C$2:C$8,"P")

  3. #3
    Forum Contributor
    Join Date
    02-15-2012
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2019
    Posts
    431

    Re: Countif with multiple criteria

    I have data for one year. The formula should consider the Dates also. I used below formula and getting error message.

    =COUNTIFS($B$2:$B$8,$A18,C$2:C$8,$C$1:$E$1,B$17,"P")

    If possible pl. help on the 2nd requirement also (formula at J18).

    Thanks,
    Nagesh.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Countif with multiple criteria

    1. You have an incorrect/missing criteria in the 2nd part...
    =COUNTIFS($B$2:$B$8,$A18,....C$2:C$8,...requires criteria...$C$1:$E$1,B$17,"P")
    2. your ranges need to be all either column OR rows, you cant mix them up...
    =COUNTIFS($B$2:$B$8,$A18,C$2:C$8,$C$1:$E$1,B$17,"P")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,585

    Re: Countif with multiple criteria

    ARRAY function in J18 then dragged across.
    Please Login or Register  to view this content.
    How ARRAY formula is entered

    Paste Formula in the cell.
    Press F2
    Hold Shift+ Ctrl Keys and hit Enter key.
    Now the formula is surrounded by {} by excel.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Countif with multiple criteria

    Just be aware that array formulas have a tendency to slow sheets down

+ 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] COUNTIF with multiple criteria.
    By ndtsteve in forum Excel General
    Replies: 3
    Last Post: 01-23-2018, 01:23 PM
  2. Countif, Multiple Criteria, Multiple Sheets, Excel 2003
    By shyammankoo in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-07-2013, 06:50 AM
  3. [SOLVED] trying to do a "countif" with multiple ranges and multiple criteria. Countif, Sumproduct?
    By completelyhis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2013, 06:12 PM
  4. Trying to COUNTIF when multiple criteria are met on multiple column data set
    By TGCRequiem in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-15-2011, 12:58 AM
  5. COUNTIF with multiple criteria
    By MattVarnell in forum Excel General
    Replies: 2
    Last Post: 01-19-2010, 11:54 AM
  6. countif multiple criteria
    By Iamwhoiam in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-27-2006, 03:30 PM
  7. Countif w/ Multiple Criteria-How do I use countif
    By Patrick_KC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2005, 05:05 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