How to Use COUNTIFS, SUMIFS, AVERAGEIFS in Excel

The three most commonly used formulas in Excel that perform simple mathematical calculations areCOUNT,SUMandAVERAGE. Whether you are managing a financial budget in Excel or simply keeping track of your next vacation, you’ve probably used one of these functions before.

In this article, we’re going to go through the basics of these three functions and their relevant and useful counterparts: COUNTIFS, SUMIFS and AVERAGEIFS.

Let’s say we are starting a new online business selling mobile phones and we have a sheet that lists the sales that we have made in the first two months.Download example Excel spreadsheet here.

Excel COUNT, SUM and AVERAGE

To know how many mobile phones that we have sold, we can quickly use theCOUNTformula as shown below:

On the other hand, to get the total amount of sales that we have made, we can use theSUMformula as shown below:

Lastly, to find out the average sales that we made for all phones, we can use theAVERAGEformula as below:

The result should be as below:

COUNT, SUM and AVERAGE formulas will only work for records where the cell value is in number format. Any record within the formula range (i.e.E2:E16in this example) not in the number format will be ignored.

So, please ensure that all cells within the COUNT, SUM and AVERAGE formula are all formatted asNumber, notText. Try to use the same formula, but withE:Eas the range instead ofE2:E16. It will return the same result as before because it ignores the header (i.e.Sale Price), which is in text format.

Now, what if we want to know number of sales, total amount of sales and the average amount of sales per phone, just for those sold in USA? This is where COUNTIFS, SUMIFS and AVERAGEIFS play an important role. Observe the formula below:

COUNTIFS

Formula breakdown:

The formula returns 6 which is the number of sales for products shipped from the USA warehouse.

SUMIFS

Formula breakdown:

The formula shows$6,050total sales that were made for products shipped from the USA warehouse.

AVERAGEIFS

Formula breakdown:

The formula shows we sold the product for around$1,008per phone in USA.

All three formula can take more than one criteria. For example if we want to know the same figures (i.e.COUNT,SUMandAVERAGE) for products sold inUSA, but specifically only for theSamsungbrand, we just need to add the data range to be checked followed by its criteria.

Please see example below where a second criteria is added to the initial criteria checks. (Blue text indicates the first criteria and red indicates the second criteria)

You will notice that Excel also hasCOUNTIF,SUMIFandAVERAGEIFformulas without the suffix“S”. Those are used similar toCOUNTIFS,SUMIFSandAVERAGEIFS. However, those without the suffix“S”in the formula have the limitation of only allowing one criteria per formula.

As the syntax is slightly different, I would recommend usingCOUNTIFS,SUMIFSandAVERAGEIFSonly as it can be used for either one criteria or more, if necessary. Enjoy!

Founder of Help Desk Geek and managing editor. He began blogging in 2007 and quit his job in 2010 to blog full-time. He has over 15 years of industry experience in IT and holds several technical certifications.Read Aseem’s Full Bio

Welcome to Help Desk Geek- a blog full of tech tips from trusted tech experts. We have thousands of articles and guides to help you troubleshoot any issue. Our articles have been read over 150 million times since we launched in 2008.

HomeAbout UsEditorial StandardsContact UsTerms of Use

Copyright © 2008-2024 Help Desk Geek.com, LLC All Rights Reserved