Sub topic 2
Finding the Smallest and Largest Values with MIN and MAX
Assume you can enter formulas and select ranges. Excel summary functions read cells and return one result. A range such as B2:B6 includes every cell from B2 through B6.
Finding extremes with MIN and MAX
MIN returns the smallest numeric value. MAX returns the largest numeric value.
=MIN(B2:B6)
=MAX(B2:B6)
=MAX(B2:B6)-MIN(B2:B6)The third formula calculates the spread between the largest and smallest values. Both functions ignore blank cells and text in a referenced range. They include zero, so a zero can change the result. An error value in the range usually makes the result an error.
Counting numbers with COUNT
COUNT counts cells containing numeric values, including dates and times because Excel stores them as numbers.
=COUNT(B2:B6)It ignores blanks and text. It also ignores logical values such as TRUE and FALSE when they are stored directly in cells. An error value is not counted and can cause formulas that reference it to return an error in other contexts.
Counting filled and empty cells
Use COUNTA when you need to count non-empty cells, regardless of whether they contain numbers, text, logical values, or errors. Use COUNTBLANK to count empty cells.
| Function | Counts | Example |
|---|---|---|
| COUNT | Numeric cells | `=COUNT(B2:B6)` |
| COUNTA | Non-empty cells | `=COUNTA(B2:B6)` |
| COUNTBLANK | Empty cells | `=COUNTBLANK(B2:B6)` |
A formula that returns an empty text string ("") is generally counted by COUNTA but counted by COUNTBLANK. This distinction matters in worksheets built with formulas.
Combining ranges, values, and columns
A function can accept several arguments separated by commas. Arguments can be ranges, individual values, or whole-column references.
=MAX(B2:B6, D2:D6, 100)
=COUNT(B2:B6, D2:D6)
=COUNTA(A:A)The first formula considers both ranges and the constant 100. Whole-column references are convenient, but they make Excel inspect many cells. Use a bounded range when performance or precision matters.
Exercise
A2:A6 contains 12, "West", blank, 0, and TRUE. What do COUNT(A2:A6), COUNTA(A2:A6), and COUNTBLANK(A2:A6) return?
Show answer
COUNT returns 2, COUNTA returns 4, and COUNTBLANK returns 1.