Methods to Use the COUNTIF Perform in Excel


Excel can do extra than simply simple arithmetic. That is due to its bevy of built-in capabilities and min-formulas that simplify the creation of extra advanced formulation.

woman uses the countif function in excel

In my decade-long expertise with Excel, I’ve discovered that one of many extra helpful capabilities is the COUNTIF perform.

Download 10 Excel Templates for Marketers [Free Kit]

You should utilize COUNTIF to rely the variety of cells that comprise a particular worth or vary of values. It’s simpler to make use of COUNTIF than to manually rely your self.

Methods to Use the COUNTIF Perform in Excel

The COUNTIF perform in Excel counts the variety of cells in a spread that meet the given standards. It doesn’t complete the cells; it merely counts them. I’ve discovered it helpful for counting cells that comprise a particular worth or vary of values.

For instance, let’s say you’ve a spreadsheet that comprises buyer contact info, together with road addresses and ZIP codes. You possibly can simply use the COUNTIF perform to rely what number of clients dwell in a given ZIP code — and also you don’t even must type the addresses by ZIP code to do it.

Let’s work via the method step-by-step.


Start by getting into the next into the cell the place you wish to place the reply:


For this instance, we’ll use a grocery checklist that I’ve written. The completely different objects I wish to purchase are sorted by sort, like greens and fruit.

2. Outline a spread of cells.

For the COUNTIF perform to work, it’s a must to enter two arguments between the parentheses — the vary of cells you’re taking a look at and the standards you wish to match.

Place your cursor inside the parentheses and both manually enter the vary of cells (e.g., D1:D20) or use your mouse to focus on the vary of cells in your spreadsheet.

Assuming your ZIP code values are in column D from row 1 to row 20, the perform ought to now appear like this:


3. Add a comma.

Subsequent, sort a comma after the vary, like this:


4. Outline your search standards.

You now have to enter the factors or worth that you just wish to rely after the comma, surrounded by citation marks.

In our instance, let’s say you’re seeking to see what number of greens are in your checklist. On this occasion, the factors you’re counting is Vegetable, and your perform ought to now appear like this:

=COUNTIF(A2:A35, Vegetable)

Word that your standards could be a quantity (“10”), textual content (“Los Angeles”), or one other cell (C3). Nonetheless, if you happen to reference one other cell, you don’t encompass it with citation marks. Standards will not be case-sensitive, so you can enter “Crimson,” “purple,” or “RED” and get the identical outcomes.

5. Activate the perform.

Press Enter, and the perform prompts, returning the variety of cells that match your argument.

Suggestions for Utilizing the COUNTIF Perform

Many customers, myself included, have found that you need to use the COUNTIF perform in many various methods in addition to counting particular values. Listed here are three suggestions I like to recommend for extending using the COUNTIF perform.

Use wildcard characters for partial matches.

You don’t must reference a particular worth or standards. Should you solely know a part of the worth you wish to rely, you need to use the * wildcard character to match any worth in that a part of the worth.

For instance, let’s say you’ve a listing of addresses. If you wish to match all ZIP codes that begin with the numbers 46 (corresponding to 46032, 46033, and 46450), you’ll enter 46 adopted by the * wildcard, like this:


You should utilize the wildcard character at both the start or the top of the worth string. For instance, to rely all cells that finish with the letters “polis,” enter the next:


This may rely cells that comprise the cities of Indianapolis and Minneapolis.

Depend values which are higher than or lower than a quantity.

Should you’re working with numbers, chances are you’ll wish to rely cells with values higher than or lower than a given worth. You do that through the use of the mathematical higher than (>) and fewer than (<) indicators.

To rely all cells which have a price higher than a given quantity, corresponding to 10, enter this:


To rely cells which are higher than or equal to a quantity, enter this:


To rely all cells which have a price lower than a given quantity, enter this:


To rely cells which have a price lower than or equal to a given quantity, enter this:


You possibly can even rely cells with a price not equal to a particular quantity. For instance, to rely cells that aren’t equal to the quantity 10, enter this:


In all these cases, do not forget that the factors, together with the lower than, higher than, and equal indicators, should be enclosed inside citation marks.

Depend one worth OR one other.

The COUNTIF perform will also be used to rely a number of standards—that’s, cells that comprise one worth or one other.

For instance, you would possibly wish to rely clients who dwell in both Los Angeles or San Diego. You do that through the use of two COUNTIF capabilities with a + between them, like this:

=COUNTIF(D1:D20,Los Angeles)+COUNTIF(D1:D20,San Diego)

So as to add much more values, enter one other + and COUNTIF perform.

If you wish to get much more out of Excel, take a look at our article on how you can use Excel like a professional. You’ll discover 29 highly effective suggestions, methods, and shortcuts that may make Excel even simpler to make use of.

Getting Began

Should you’re seeking to rely the variety of objects that match particular standards, the COUNTIF perform is the best way to go. You can simply type on that column and manually rely the entries, however utilizing COUNTIF is an entire lot simpler.

Now, strive it out and save your self a while.

excel marketing templates



Leave a Reply

Your email address will not be published. Required fields are marked *