COUNTIFS

    Statistical

    Counts cells that meet multiple criteria. More powerful than COUNTIF.

    Translations
    EnglishCOUNTIFS
    FrenchNB.SI.ENS
    SpanishCONTAR.SI.CONJUNTO
    GermanZÄHLENWENNS
    ItalianCONTA.PIÙ.SE
    PortugueseCONT.SES
    DutchAANTALLEN.ALS
    PolishLICZ.WARUNKI
    RussianСЧЁТЕСЛИМН
    TurkishÇOKEĞERSAY
    CzechCOUNTIFS
    HungarianDARABHATÖBB
    SwedishANTAL.OMF
    DanishTÆLHVISER
    FinnishLASKE.JOS.JOUKKO
    Syntax
    COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], ...)

    Arguments

    • criteria_range1First range to evaluate
    • criteria1First condition
    • criteria_range2Additional range(optional)
    • criteria2Additional condition(optional)
    Examples
    =COUNTIFS(A:A,"Sales",B:B,">1000")
    Count

    Counts where A is 'Sales' AND B>1000

    =COUNTIFS(A:A,A1,B:B,B1)
    Match count

    Counts matching pairs

    =COUNTIFS(A:A,">="&DATE(2024,1,1),A:A,"<="&DATE(2024,12,31))
    Date range count

    Counts dates in 2024

    Tips & Best Practices
    • All criteria must be met (AND logic)
    • Use with date ranges for date counting
    • Wildcards * and ? work in text criteria
    Common Mistakes
    • Letting the criteria ranges end up different sizes, which trips a #VALUE! error with no obvious clue why
    • Expecting COUNTIFS to give you OR logic between conditions - it's AND-only, every pair has to match at once
    • Writing >=A1 instead of ">="&A1 and wondering why the operator combined with a cell reference doesn't work
    Related Functions
    COUNTIFThe simpler version when you only need one condition, not several
    SUMIFSSame multi-condition structure, just adding up a range instead of counting rows
    AVERAGEIFSSame logic once more, this time averaging the matching rows instead of counting them
    Frequently Asked Questions

    Can COUNTIFS check conditions spread across different columns?

    That's exactly what it's for - each criteria_range/criteria pair can point at a different column, and COUNTIFS only counts a row when every pair matches.

    How do I count rows matching either of two values?

    COUNTIFS alone can't do OR logic. Add two COUNTIFS together, one per value, or drop both values into an array constant like COUNTIFS(A:A,{"Yes";"Maybe"}) wrapped in SUM.

    Why does COUNTIFS keep giving me a #VALUE! error?

    Almost always because the criteria ranges aren't the same size - same number of rows and columns across every pair. COUNTIFS is strict about that.

    Need to translate a formula using COUNTIFS?

    Use our translator to convert your complete formula