## Different ways to count values with a formula in an excel report

I always need to count something in my reports, it can be to count 1 or multiple values, to count how many incidents for a specific group, to count only 1 or many conditions are met, etc.

When I use the formula ?

Every time I need to count something.

How to use the formula ?

The formula in this topic is with "," so depending of the operating system of your PC, the formula should have ";" instead of ",".

How are the formulas ?

=COUNTIF()

=COUNTIFS()

This formula counts only 1 specific value:

=COUNTIF(B:B,"chocolate")

This formula counts only 2 different values:

=COUNTIFS(B:B,"chocolate",C:C,"dark")

This formula counts only 1 specific letter:

=COUNTIF(B:B,"*d*")

NOTE: if the “d” is at the beginning, put “d*” for instance “donut” and if at the end “*d” for instance “tunod”

This formula counts only 3 different letters:

=COUNTIFS(A:A,"*s*",C:C,"*i*",B:B,"*d*")

This formula counts only numbers for 1 specific condition:

=COUNTIFS(A:A,">1",C:C,"=0",B:B,"chocolate")

This formula counts only the question mark in cell E2:

=COUNTIFS(A:A,"*~?")

You can ask it to count only for a specific condition in cell E3:

=COUNTIFS(A:A,"*~?",B:B,"chocolate")