How to sum and average in Excel — when AutoSum grabs only part of the range, blanks vs zeros, numbers stored as text, totals after a filter
If your total doesn't match what you add up by hand, or an average comes out lower than expected, this lesson is for you. With a made-up sheet of items sold in one week (Wednesday closed = blank, Sunday 0 sold, Thursday's 18 typed as text), we checked in Excel (Microsoft 365) what the status bar, AutoSum, SUM and AVERAGE each count — and what changes with hidden rows and filters.
Just select — the status bar shows Average, Count and Sum
When you don't need the total written in a cell, simply drag over the cells. The status bar at the bottom of the Excel window shows their average, count and sum right away. Selecting B3:B9 (Mon–Sun) on the practice file gave Average 14.4 · Count 6 · Sum 72.
Add the numbers by hand, though, and you get 12 + 15 + 18 + 20 + 25 + 0 = 90. The status bar says 72 — Thursday's 18 is missing. That cell's 18 sits at the left edge with a green triangle in its corner: it looks like a number but Excel holds it as text (Excel's error checking on this PC flagged it as a number stored as text). 'Count 6' counts non-empty cells including text, so it also differs from =COUNT (5).
Numbers pasted from another program, numbers typed after an apostrophe ('), and numbers typed into cells already formatted as Text end up as text like this. Numbers normally line up on the right and text on the left — a quick first check.
Trap 1 — AutoSum grabs only part of the range
The quickest way to write a total is to click the cell right below the numbers and press Home > AutoSum (Σ) or Alt+=. Excel looks upward for numbers, outlines the suggested =SUM(…) range with a dashed border, and Enter puts it in.
| A | B | |
|---|---|---|
| 1 | Day | Sold |
| 2 | Mon | 12 |
| 3 | Tue | 15 |
| 4 | Wed | |
| 5 | Thu | 18 |
| 6 | Fri | 20 |
| 7 | Sat | 25 |
| 8 | Sun | 0 |
On the practice file, clicking B10 right under the table and pressing AutoSum gave a suggestion of =SUM(B7:B9) — only Fri, Sat and Sun. Going up in search of numbers, Excel stopped at the text cell (Thursday). Press Enter as is and you get 45, with no warning.
So after pressing AutoSum, look at how far the dashed border reaches before you press Enter. If it's too short, drag over B3:B9 again while the formula is still being edited. Selecting the numbers and the total cell together before pressing AutoSum used exactly what you selected (on the test sheet, B2:B9 gave =SUM(B2:B8)) — but while Thursday is text that's still 72.
Trap 2 — numbers stored as text drop out of SUM
We added the same seven cells several ways (measured on the test sheet B2:B8; written here with the practice file's addresses). Functions (SUM, AVERAGE, COUNT) skip text inside a range, while chaining cells with + converts the text '18' and adds it. So one table gives two totals.
| Formula (Thursday's 18 is text) | Result | What it counted |
|---|---|---|
| =SUM(B3:B9) | 72 | Number cells only — the text 18 is skipped |
| =B3+B4+B5+B6+B7+B8+B9 | 90 | Converts the text 18 and adds it (blank = 0) |
| =AVERAGE(B3:B9) | 14.4 | Average of the 5 number cells (72 ÷ 5) |
| =COUNT(B3:B9) | 5 | Number cells |
| =COUNTA(B3:B9) | 6 | Non-empty cells (text included) |
The fix is to turn Thursday into a real number. Click the cell, then the ⚠ button > Convert to Number — the value moves to the right and the green triangle disappears. After that =SUM(B3:B9) gave 90 and =AVERAGE(B3:B9) gave 15. With several text cells, select them all and convert them in one go.
Averages — blanks are left out, zeros count
=AVERAGE adds only cells that contain numbers and divides by how many there are. A blank cell like Wednesday (closed) is skipped entirely, while a 0 like Sunday counts as a day. On the fixed sheet =AVERAGE(B3:B9) was 90 ÷ 6 = 15.
| What you want | Formula | Result (fixed sheet) |
|---|---|---|
| Average of open days (0 included) | =AVERAGE(B3:B9) | 15 |
| Average of days with sales (0 left out) | =AVERAGEIF(B3:B9,">0") | 18 |
| Seven-day average (closed day as 0) | =SUM(B3:B9)/7 | 12.86 |
Which average is right depends on what the sheet means. Write 0 for days you were open but sold nothing, leave closed days blank, and =AVERAGE becomes 'average of open days'. Typing 0 on a closed day pulls the average down. (The seven-day figure in the last row is calculated, not read from the sheet.)
Hidden rows and filters — SUM adds everything, SUBTOTAL only what's visible
Hiding the Saturday row (25) left =SUM at 90 — SUM includes hidden rows (measured on the test sheet with the same data). The function that adds only visible rows is SUBTOTAL: a first argument of 109 means 'sum, skipping hidden rows', and 9 means 'sum, including rows you hid by hand'.
| Formula | Saturday row hidden | Filter: Sold ≥ 15 |
|---|---|---|
| =SUM(B3:B9) | 90 | 90 |
| =SUBTOTAL(9,B3:B9) | 90 | 78 |
| =SUBTOTAL(109,B3:B9) | 65 | 78 |
Rows hidden by a filter are skipped by both 9 and 109. Filtering Sold to 15 or more left four rows — Tue, Thu, Fri, Sat (the status bar reported 4 of 7 records) — and SUBTOTAL gave 78 while SUM stayed at 90.
Pressing AutoSum right under a filtered table made Excel insert SUBTOTAL(9, …) instead of SUM — good. But on the test sheet the range covered only Thursday to Sunday, giving 63 (the visible rows add up to 78): it didn't climb past the hidden blank Wednesday. Check the dashed range here too.
Common snags
- The total is lower than your hand count: a number stored as text (left-aligned, green triangle) — ⚠ > Convert to Number
- AutoSum added only some cells: it stops at a blank or text cell above — check the dashed range before Enter and drag again
- The average is too low: closed days were typed as 0 — leave them blank or use =AVERAGEIF(range,">0")
- Hidden rows are still added: =SUM adds everything — use =SUBTOTAL(109, range)
- Status bar Count ≠ COUNT: the status bar counts non-empty cells (text too); COUNT counts numbers only
Practice
Open the practice file (a made-up week of sales) and try these steps.
- 1Select B3:B9 and read Average, Count and Sum on the status bar (14.4 · 6 · 72).
- 2Click B10 and press AutoSum — see how far the dashed range goes, then press Esc.
- 3Convert Thursday (B6) with ⚠ > Convert to Number, then enter =SUM(B3:B9) in B11, =AVERAGE(B3:B9) in B12 and =AVERAGEIF(B3:B9,">0") in B13.
- 4Put =SUBTOTAL(109,B3:B9) in B14, filter Sold to 15 or more, and compare B11 with B14.
The answer file has Thursday fixed to a number and shows Total 90 · Average 15 · days-with-sales average 18 · visible-rows total · 6 number cells · 6 non-empty cells, with the filter on.
FAQ
Q. Why doesn't my Excel total match the sum I add by hand?
Most likely a cell that looks like a number is stored as text. With Thursday's 18 as text, =SUM gave 72 (18 skipped) while chaining the cells with + gave 90. Use the green triangle > ⚠ > Convert to Number and SUM gives 90 as well.
Q. AutoSum (Alt+=) only added some of my numbers.
AutoSum walks up looking for numbers and stops at a blank or a text cell. On our sheet it suggested only three cells (45). Before pressing Enter, look at the dashed range and drag over the right cells if it's too short.
Q. How does Excel's AVERAGE treat blanks and zeros?
=AVERAGE skips blank cells but counts zeros. Seven cells with one blank and one zero (total 90) averaged 90 ÷ 6 = 15; leaving the zero out with =AVERAGEIF(range,">0") gave 18.
Q. I applied a filter but the total didn't change.
=SUM adds hidden rows too. Use =SUBTOTAL(109, range) to add visible rows only — with a 'sold ≥ 15' filter, SUM stayed at 90 and SUBTOTAL gave 78. Use 109 rather than 9 if you also hide rows by hand.
Comments 0
No comments yet. Be the first.
Only members can comment.
Comments with ads, abuse, personal information or illegal content are hidden or removed. Members who post ads, spam, or hateful content are removed from the site, and everything they wrote is deleted. Comments are shown with your nickname. Privacy Policy