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 the COUNT formula as shown below:On the other hand, to get the total amount of sales that we have made, we can use the SUM formula as shown below:Lastly, to find out the average sales that we made for all phones, we can use the AVERAGE formula 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:E16 in 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 as Number, not Text. Try to use the same formula, but with E:E as the range instead of E2: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,050 total sales that were made for products shipped from the USA warehouse.
AVERAGEIFS
Formula breakdown:The formula shows we sold the product for around $1,008 per 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, SUM and AVERAGE) for products sold in USA, but specifically only for the Samsung brand, 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 has COUNTIF, SUMIF and AVERAGEIF formulas without the suffix “S”. Those are used similar to COUNTIFS, SUMIFS and AVERAGEIFS. 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 using COUNTIFS, SUMIFS and AVERAGEIFS only as it can be used for either one criteria or more, if necessary. Enjoy!