The five statistical functions covered in this module — SUM, AVERAGE, COUNT, MAX, and MIN — are the most frequently used functions in Excel. They handle 80% of everyday calculation needs in SA offices: totalling salary columns, calculating class averages, counting how many invoices were processed, finding the highest sales figure, and identifying the lowest stock level. This module covers every variant of each function, their syntax, practical examples, and the important differences between related functions like COUNT vs COUNTA vs COUNTBLANK.
SUM adds a list of numbers. It is the single most-used function in Excel and the starting point for all financial work.
| Formula | What It Does |
|---|---|
=SUM(A1:A10) | Adds all values in cells A1 through A10 (a contiguous range) |
=SUM(A1:A10, C1:C10) | Adds values in A1:A10 AND C1:C10 (two separate non-contiguous ranges) |
=SUM(A1, B1, C1) | Adds three individual cells — useful when the cells are not adjacent |
=SUM(A1:A10, 500) | Adds the range A1:A10 plus the literal value 500 |
=SUM(A:A) | Adds the entire column A (all numeric values; blank and text cells are ignored) |
=SUM(A1:Z1) | Adds an entire row across columns A to Z |
=SUM(Sheet2!B2:B50) | Sums a range on a different sheet (Sheet2). The sheet name is followed by !. |
| Cell Contains | SUM Treatment |
|---|---|
| Number (e.g., 1500) | Included in the sum |
| Blank / empty | Ignored — treated as 0; does not cause an error |
| Text (e.g., "Cape Town") | Ignored — text is skipped silently; no error |
| Number stored as text | Ignored — this is a common mistake. If SUM returns 0 when you expect a total, check whether the numbers are stored as text (they appear left-aligned with a green triangle). |
| Boolean (TRUE/FALSE) | Ignored (SUM ignores TRUE and FALSE in a range reference) |
| Error (e.g., #VALUE!) | Causes SUM to return the same error. Wrap with IFERROR or use AGGREGATE to handle ranges containing errors. |
When you only want to sum values that meet a condition (e.g., only Gauteng sales, only amounts above R10,000), use SUMIF or SUMIFS — covered fully in Module 19.
AVERAGE calculates the arithmetic mean: it adds all the numbers in a range and divides by the count of those numbers. It is used for performance analysis, grade calculations, sales averages, and any situation where you need a representative midpoint value.
| Formula | What It Does |
|---|---|
=AVERAGE(A1:A10) | Mean of all numeric values in A1:A10 |
=AVERAGE(A1:A10, C1:C10) | Mean of values across two separate ranges combined |
=AVERAGE(85, 92, 78, 95) | Average of four literal scores = 87.5 |
| Cell Contains | AVERAGE Treatment | Impact |
|---|---|---|
| Number | Included in sum AND count | Normal calculation |
| Blank / empty | Excluded from both sum AND count | This is critical: blank cells are NOT treated as zero. =AVERAGE(10, 20, , 30) = 20 (divides by 3, not 4). This is usually the correct behaviour for missing data. |
| Text | Ignored — excluded from sum and count | Does not cause an error; text cells are skipped |
| Zero (0) | Included in sum and count | Zero IS included — unlike blank. =AVERAGE(10, 0, 20) = 10 (sums to 30, divides by 3). If you want to exclude zeros, use AVERAGEIF (see below). |
When different values should count more than others (e.g., a final exam worth 60% and coursework worth 40%):
Excel has a family of COUNT functions, each counting different types of cells. Choosing the right one is essential — using the wrong COUNT function is a very common mistake that gives incorrect results silently.
| Formula | Result (if range has 8 numbers, 2 blanks, 1 text) |
|---|---|
=COUNT(A1:A11) | 8 — counts only the numeric cells |
| Formula | Result (if range has 8 numbers, 2 blanks, 1 text) |
|---|---|
=COUNTA(A1:A11) | 9 — counts numbers AND the text cell; ignores only blank cells |
="") — they appear blank but technically contain a formula| Formula | What It Counts |
|---|---|
=COUNTIF(B2:B100,"Gauteng") | Number of cells in B2:B100 that contain exactly "Gauteng" |
=COUNTIF(C2:C100,">50000") | Number of values in C2:C100 greater than 50,000 |
=COUNTIF(D2:D100,"<>"&"") | Count of non-blank cells (alternative to COUNTA) |
=COUNTIF(A2:A100,A2) | How many times the value in A2 appears in the range A2:A100 (detecting duplicates) |
=COUNTIF(B2:B100,"*Pty*") | Count cells containing the text "Pty" anywhere (* is a wildcard). Useful for finding cells containing partial text. |
| Function | Counts | Ignores |
|---|---|---|
| COUNT | Numbers (and dates/times) | Text, blanks, errors |
| COUNTA | Anything non-blank (numbers, text, errors, TRUE/FALSE) | Truly empty cells only |
| COUNTBLANK | Empty cells and ="" cells | All cells with any content |
| COUNTIF | Cells matching one condition | Cells not matching the condition |
| COUNTIFS | Cells matching ALL specified conditions | Cells that fail any one condition |
MAX returns the largest numeric value in a range. It is used to find the top performer, the highest invoice amount, the maximum temperature, or the peak sales figure.
| Formula | What It Returns |
|---|---|
=MAX(A1:A100) | The largest number in the range A1:A100 |
=MAX(A1:A100, C1:C100) | The largest number across both ranges combined |
=MAX(Sales!B2:B200) | The highest value from the Sales sheet column B |
When you need the 2nd largest, 3rd largest, etc.:
=MAX(SalesTable[Revenue]) → find the highest revenue; then use INDEX/MATCH to find whose it was=MAX(A2:A100) on a date column → returns the most recent date=MAX(InvoiceAmount) → find the largest single invoice=MAX(A2:A100)+1 → auto-generate the next sequential IDMIN returns the smallest numeric value in a range. It is used for finding the lowest salary, the minimum stock level, the earliest date, or the smallest measurement in a dataset.
| Formula | What It Returns |
|---|---|
=MIN(A1:A100) | The smallest number in the range |
=MIN(A1:A100, C1:C100) | The smallest number across both ranges |
=MIN(Inventory[Stock_Level]) | Lowest stock level in the Inventory Table |
=IF(MIN(StockLevel)<10,"REORDER NOW","OK") → alert when any stock falls below 10=MIN(A2:A100) on a date column → returns the oldest/earliest date=MIN(EmployeeList[Salary]) → identify the lowest-paid employee for payroll review=MAX(MIN_PAYMENT, MIN(Balance, Full_Amount)) → calculate a minimum instalment paymentYou do not always need to write a formula to see SUM, AVERAGE, COUNT, MAX, and MIN. When cells are selected, Excel shows these values instantly in the Status Bar at the very bottom of the screen — the grey bar that normally shows "Ready".
| Indicator | What It Shows |
|---|---|
| Average | AVERAGE of selected numeric cells |
| Count | COUNTA — total non-empty cells (any content) |
| Numerical Count | COUNT — only cells with numeric values |
| Minimum | MIN of the selection |
| Maximum | MAX of the selection |
| Sum | SUM of the selection |
These functions become much more powerful when combined with each other or with other functions to answer complex business questions.
| Business Question | Formula |
|---|---|
| What percentage of the total does each region represent? | =C2/SUM($C$2:$C$10) (format as %) — absolute reference on SUM so it does not shift when copied |
| How many employees earn above the average salary? | =COUNTIF(B2:B100,">"&AVERAGE(B2:B100)) — AVERAGE is used as the threshold inside COUNTIF |
| What is the difference between the highest and lowest salary? | =MAX(B2:B100)-MIN(B2:B100) — the salary range (spread) |
| What percentage of records are complete (not blank)? | =COUNTA(A2:A100)/COUNT(ROW(A2:A100)) — or more simply: =(COUNTA(A2:A100)-COUNTBLANK(A2:A100))/COUNTA(A2:A100) |
| Is any value at or below the reorder threshold? | =IF(MIN(C2:C50)<=D1,"REORDER REQUIRED","Stock OK") where D1 is the reorder level |
| What is the average of the top 3 values? | =AVERAGE(LARGE(A2:A100,{1,2,3})) — array formula using LARGE with multiple k values |
Q1: A column contains: 100, 200, blank, 300, "N/A" (text). What does =SUM(A1:A5) return, and what does =COUNT(A1:A5) return?
✓ =SUM(A1:A5) returns 600. SUM adds the three numeric values (100+200+300=600) and ignores the blank cell and the text "N/A". =COUNT(A1:A5) returns 3. COUNT counts only the numeric cells (100, 200, 300) and ignores both the blank cell and the text "N/A".
Q2: You have 10 employees. Their performance scores are in B2:B11. Three employees have not yet received scores — those cells are blank. One employee scored exactly 0. What does =AVERAGE(B2:B11) calculate, and why might the result be misleading?
✓ =AVERAGE(B2:B11) ignores the three blank cells entirely — it sums the 7 scores that exist (including the 0) and divides by 7. This means it calculates the average for the 7 who have been scored. If you want the average across all 10 employees (treating missing scores as 0), you should not use AVERAGE — instead use =SUM(B2:B11)/10. The result from AVERAGE may be misleadingly high because it excludes the three employees who have no score yet. Always verify whether blank means "no data yet" (exclude) or "scored 0" (include as 0) before choosing your formula.
Q3: You have a list of 200 transactions in column C (C2:C201). Write a formula that counts how many transactions are above R50,000 AND occurred in the Gauteng region (Gauteng is in column B).
✓ =COUNTIFS(B2:B201,"Gauteng",C2:C201,">50000"). COUNTIFS allows multiple conditions: criteria_range1 is B2:B201 with criteria "Gauteng", and criteria_range2 is C2:C201 with criteria ">50000". Only rows where BOTH conditions are met are counted. Note the greater-than symbol and 50000 must be inside quotes when used as a criteria string in COUNTIFS.
Q4: You want to display a message "REORDER NOW" if the minimum stock level in C2:C100 falls below 5, and "Stock OK" otherwise. Write the formula.
✓ =IF(MIN(C2:C100)<5,"REORDER NOW","Stock OK"). MIN(C2:C100) finds the lowest stock level across all 99 products. If that minimum is less than 5, the IF function returns "REORDER NOW"; otherwise it returns "Stock OK". This is a combined formula: MIN used as the condition test inside an IF function.
Q5: What is the difference between COUNT and COUNTA? Give an example of when you would use each.
✓ COUNT counts only cells containing numeric values (numbers, dates, times). COUNTA counts every non-empty cell regardless of content type — numbers, text, dates, errors, TRUE/FALSE. Example for COUNT: =COUNT(B2:B51) on a salary column tells you how many employees have a salary amount entered (numbers only) — useful for payroll completeness checking. Example for COUNTA: =COUNTA(A2:A51) on a name column tells you how many employees are listed (names are text) — gives the total headcount. If you used COUNT on the name column it would return 0 because names are text.
Q6: You need the highest revenue figure from the Gauteng region only. The revenue is in column D and region is in column C. You are using Excel 2019. Write the formula and name the function used.
✓ =MAXIFS(D2:D201,C2:C201,"Gauteng"). The function is MAXIFS, available in Excel 2019 and later. max_range is D2:D201 (where the values are); criteria_range1 is C2:C201 (where the condition is checked); criteria1 is "Gauteng" (the condition to match). MAXIFS returns the largest value in D where the corresponding cell in C equals "Gauteng". If you have Excel 2016 or earlier (no MAXIFS), use the array formula: =MAX(IF(C2:C201="Gauteng",D2:D201)) entered with Ctrl+Shift+Enter.