Share via

The COUNTIFS() Advantage

Anonymous
2012-02-13T17:46:25+00:00

In A1 thru B10:

dog small
dog large
cat small
cat large
dog small
mouse small
dog small
bird small
cat large
flea huge

Prior to 2007, if I wanted to count the number of small dogs,  I might use:

=SUMPRODUCT((A1:A10="dog")*(B1:B10="small"))

In Excel 2007, I can use:

=COUNTIFS(A1:A10,"dog",B1:B10,"small")

The new formula is only 38 characters (as compared to 44 in the old formula).  This may improve my productivity.

Is there any other advantage to using COUNTIFS()??

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2012-02-13T18:20:03+00:00

COUNTIFS will be considerably quicker if you use longer ranges. With XL2007 and later you can use full-column references with both those functions (handy if you don't know how much data there is), but the SP version will examine all cells within the range whereas COUNTIFS will only use the cells up to what Excel regards as the last-used row.

Hope this helps.

Pete

EDIT: Plus, you can use the wildcard characters with COUNTIFS, but with SP you would need an ISNUMBER(SEARCH... construct to achieve this, which will slow it down even more.

Was this answer helpful?

0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2012-02-13T20:12:08+00:00

    Yes....I have SP3

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2012-02-13T18:24:31+00:00

    You're welcome - did you see my edit ? (maybe added after your reply).

    Pete

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2012-02-13T18:22:01+00:00

    Thank you !

    Was this answer helpful?

    0 comments No comments