๐ Lesson 8.2: Performance, Common Errors & Best Practices
A spreadsheet that calculates the wrong answer with total confidence is worse than no spreadsheet at all. This lesson is where you become trustworthy with Excel โ able to read every error value it throws, trace a broken formula back to its cause, keep a big workbook fast, and build in the habits that keep your numbers right. It's the polish that separates a sheet that happens to work today from one you'd stake a decision on.
๐ What You'll Learn
By the end of this lesson, you will be able to:
- Recognize every common error value โ
#DIV/0!,#VALUE!,#REF!,#NAME?,#N/A,#SPILL!,#NUM!,#####โ and know what causes each - Fix and trace errors with IFERROR, Trace Precedents/Dependents, Evaluate Formula, and Show Formulas (Ctrl+`)
- Keep workbooks fast โ avoid whole-column ranges and piles of volatile functions, use Tables, and switch to manual calc for huge files
- Apply professional best practices: one source of truth, no hardcoded numbers, labels & documentation, backups, and cell/sheet protection
- Adopt a checking mindset so you never trust a formula you haven't verified
โฑ๏ธ Estimated Time: 50 minutes
๐ฏ Project: Audit and repair a deliberately broken, inefficient sheet โ fix each error, wrap risky formulas in IFERROR, tidy the structure, and protect the finished result.
In This Lesson
Reading Excel's Error Values
When Excel can't produce a valid result, it doesn't crash โ it puts a small error value in the
cell that tells you what went wrong. Learning to read these is like learning to read warning lights on a
dashboard: each one points at a specific cause, and once you know them, fixing is fast. Every error starts with a
# and usually ends with an exclamation mark.
| Error | What it means | Common cause | Typical fix |
|---|---|---|---|
#DIV/0! |
Divide by zero | A formula divides by a cell that's 0 or empty, e.g. =A2/B2 with B2 blank |
Check the denominator; wrap in IFERROR or test with IF |
#VALUE! |
Wrong type of value | Text where a number is expected, e.g. =A2+B2 when B2 holds "n/a" |
Fix the data type; use functions that ignore text like SUM |
#REF! |
Invalid reference | A referenced cell was deleted, or a lookup points off the sheet | Undo the delete, or repoint the formula to a valid cell |
#NAME? |
Excel doesn't recognize a name | Misspelled function or a named range that doesn't exist, e.g. =SUMM(A1:A9) |
Correct the spelling; check the named range exists |
#N/A |
Value not available | A lookup found no match, e.g. VLOOKUP/XLOOKUP with no hit |
Confirm the lookup value exists; give XLOOKUP an if_not_found argument |
#SPILL! |
A dynamic array can't spill | Something blocks the spill range of FILTER/SORT/UNIQUE |
Clear the cells below/right of the formula so it has room |
#NUM! |
Invalid number | An impossible calculation, e.g. the square root of a negative, or a number too large | Check the inputs and the math the formula is asking for |
##### |
Not an error โ column too narrow | The column isn't wide enough to show a number/date (or a negative date/time) | Widen the column (double-click its right border); check for negative dates |
๐ Note: ##### is the friendly one
##### isn't a formula error at all โ the value is fine, the column is just too narrow to
display it. Double-click the boundary between two column headers to auto-fit, or drag it wider, and the number
reappears. (The one real problem it can signal is a negative date or time, which Excel can't show.)
A green triangle in a cell's corner is Excel flagging a possible issue โ click the cell and the little warning icon to see what it suspects (a number stored as text, a formula that skips adjacent cells). These are warnings, not always errors, but they're worth a look; they often catch a mistake before it spreads.
Tracing & Fixing Errors
Knowing what an error means is half the battle; the other half is finding where it comes from. A wrong total is often caused by a cell three steps upstream. Excel's Formulas tab has a small toolkit โ the Formula Auditing group โ built exactly for this detective work.
- Trace Precedents โ select a cell and click this to draw arrows to every cell that feeds into it. It answers "what is this formula built from?"
- Trace Dependents โ the reverse: arrows to every cell that uses this one. It answers "if I change this, what breaks?" โ invaluable before deleting anything.
- Evaluate Formula โ steps through a formula one calculation at a time, showing each intermediate result, so you can watch exactly where it goes wrong. Perfect for a long nested formula.
- Show Formulas (Ctrl+`, the backtick key) โ toggles the whole sheet between showing results and showing the underlying formulas. The single fastest way to scan a sheet for a stray hardcoded number or an inconsistent formula.
- Error Checking โ walks you through flagged errors one by one, like a spell-checker for formulas, offering a likely fix for each.
๐ก Show Formulas is your X-ray
Get in the habit of pressing Ctrl+` to reveal all formulas at once. Suddenly you can see the logic: a column that should be all the same formula but has one typed-in number stands out instantly, and a copied formula whose references drifted is obvious. Press it again to switch back to results. (On some keyboards the backtick sits just above Tab, left of 1.)
The general repair loop is: read the error value to learn the type of problem, use Trace Precedents or
Evaluate Formula to find the cell causing it, fix the root cause (the data or the reference), and only
then decide whether to wrap the formula in IFERROR to handle the case gracefully in future. Fix the
cause first; hide the symptom second.
IFERROR โ Catching Errors Gracefully
Sometimes an error is expected โ a lookup that legitimately has no match yet, a division where the
denominator is sometimes zero. You don't want a wall of red #N/A or #DIV/0! in a report.
IFERROR lets you replace an error with something friendlier:
=IFERROR( your_formula , value_if_error )
Examples:
=IFERROR(A2/B2, 0) โ shows 0 instead of #DIV/0!
=IFERROR(A2/B2, "") โ shows a blank cell instead
=IFERROR(VLOOKUP(D2, Prices, 2, FALSE), "Not found")
=IFERROR(XLOOKUP(D2, Codes, Names), "โ") โ clean dash when no match
There's a modern relative worth knowing: IFNA catches only #N/A and lets
other errors through โ useful when you want a missing lookup handled but still want to see a genuine
#VALUE! or #REF! so you can fix it. And XLOOKUP (Lesson 4.1) has a built-in
if_not_found argument, so you often don't need to wrap it at all.
โ ๏ธ Watch Out โ don't hide real problems
IFERROR is a double-edged sword. Wrapping everything in it makes a broken sheet
look clean while quietly swallowing genuine mistakes โ a #REF! from a deleted column
should be fixed, not turned into a blank. Use IFERROR for errors you expect and
have thought about; investigate and fix the ones you don't. When in doubt, prefer IFNA so only
the truly-harmless "no match" case is hidden.
Performance โ Keeping Workbooks Fast
Small workbooks feel instant. As they grow โ tens of thousands of rows, hundreds of formulas โ they can start to lag on every edit, because Excel recalculates whenever anything changes. A few habits keep even large files snappy, and they matter most in Excel for the web, which is lighter than the desktop app.
- Avoid whole-column ranges.
=SUMIF(A:A, โฆ)across an entire column forces Excel to consider a million rows. Point formulas at the range you actually use, or better, at a Table column (Table1[Amount]) that grows exactly with your data. - Go easy on volatile functions.
NOW,TODAY,RAND,OFFSET, andINDIRECTrecalculate on every change to the whole workbook. A few are fine; hundreds will drag. - Use Tables and efficient functions. Tables auto-expand, keep references readable, and
stop stray whole-column scans. Prefer purpose-built functions (
SUMIFS,XLOOKUP) over giant nested workarounds. - Switch to Manual calculation for huge files. Formulas โ Calculation Options โ Manual stops the constant recalc; press F9 to recalculate when you're ready. Turn automatic calc back on when you're done. (This is mainly a desktop-app control.)
- Keep raw data separate from reports. One sheet for clean source data, another for your calculations and dashboard. It's easier to reason about, faster to recalc, and far safer to edit.
๐ง Why "raw data separate from reports" matters so much
This one habit prevents most spreadsheet disasters. When your raw data lives untouched on its own sheet and every report reads from it with formulas, you can rebuild any view without endangering the source, and you always have one honest record of what actually happened. Mixing typed-over numbers into your report sheet is how a workbook slowly becomes untrustworthy. Your capstone in the next lesson is built on exactly this separation.
Best Practices for Trustworthy Workbooks
Beyond speed, a handful of professional habits make the difference between a spreadsheet people trust and one they quietly stop believing. None are hard; together they're what "good with Excel" really means.
- One source of truth. Every fact lives in exactly one place. If a tax rate or a target appears in ten formulas, put it in one labeled cell and point all ten at it. Change it once, everything updates โ and there's no chance of nine cells being right and one being stale.
- Don't hardcode numbers in formulas.
=B2*0.2hides the 0.2. Put the rate in a labeled cell (sayF1) and write=B2*$F$1. Now the assumption is visible, documented, and editable โ and your reader can see why, not just what. - Label and document. Clear headers, a units note ("amounts in USD"), maybe a small "About this sheet" area or cell comments explaining any tricky formula. Your future self is the main beneficiary.
- Consistent structure. The same formula all the way down a column, aligned headings, one record per row. Consistency is what makes errors visible โ the odd one out jumps at you.
- Back up & use version history. Save to OneDrive and you get automatic Version History (on the desktop, File โ Info โ Version History; on the web, File โ Info โ Previous Versions, or right-click the file in OneDrive and choose Version history) โ roll back to any earlier state if something goes wrong. This is a huge, free safety net.
- Protect sheets and lock cells. On the Review tab, Protect Sheet stops accidental edits to formulas and headings. By default every cell is "locked," which only takes effect once the sheet is protected โ so unlock the cells people should type in (Format Cells โ Protection โ uncheck Locked), then protect the sheet. Now data-entry cells are open and your formulas are safe.
๐ก The "labeled assumptions" pattern
Give your workbook a small Assumptions or Settings area โ a few labeled
cells for the rates, targets, and thresholds your formulas depend on. Every formula references those cells with
absolute refs ($F$1). It's the single highest-leverage habit for a trustworthy, maintainable
sheet: all the "magic numbers" are in one visible, documented place.
The Checking Mindset
We flagged this back in Lesson 1.1: Excel will calculate a wrong answer from wrong input with total confidence. The most valuable skill isn't writing formulas โ it's not trusting them until you've checked. A checking mindset is a set of small, cheap habits:
- Sanity-check the size. Does the total look roughly right? If a monthly budget shows a number ten times too big, something's doubled-up.
- Test with a known case. Type in a row where you know the answer and confirm the formula agrees.
- Cross-total. Sum a total two ways (down the rows and across the columns, or with a
SUMand aSUMIFS) and check they match. - Watch for silent gaps. A
SUMthat misses the top row, a lookup returning#N/AthatIFERRORturned into 0 โ these hide in plain sight. - Show Formulas periodically (Ctrl+`) to scan for stray hardcoded numbers and inconsistent formulas.
is it 0 or blank"] B -->|"Value not available"| D["Lookup found no match
check the lookup value"] B -->|"Invalid reference"| E["A referenced cell was deleted
repoint the formula"] B -->|"Unknown name"| F["Fix the misspelled name
or missing named range"] C --> G["Fix the root cause"] D --> G E --> G F --> G G --> H{"Is this error expected sometimes?"} H -->|"Yes"| I["Wrap in IFERROR or IFNA"] H -->|"No"| J["Leave it fixed and visible"]
โ ๏ธ Important Note: A clean-looking spreadsheet is not the same as a correct one.
IFERROR can make a badly broken sheet look pristine. Correctness comes from checking, not from the
absence of red text. Build the habit now, before the capstone.
๐ฏ Project: Audit & Fix a Broken Sheet
Time to play detective. You'll build (or imagine) a small, deliberately broken sheet, then repair it end to
end: fix each error at its root, wrap the genuinely-expected ones in IFERROR, tidy the structure so
it's fast and readable, and finally protect it so nobody undoes your work by accident. This is the exact workflow
you'll use on any real workbook that lands in your lap.
๐๏ธ Repair a deliberately broken, inefficient sheet
Objective: Turn a messy, error-filled sheet into a fast, correct, protected one โ and prove to yourself you can diagnose any error.
Instructions (about 25 minutes):
- (4 min) Recreate the broken starter below on a fresh sheet (or download any messy workbook you have). You should see several error values appear.
- (3 min) Press Ctrl+` to Show Formulas and scan the whole sheet. Note every error and any hardcoded numbers.
- (6 min) Fix each error at its root: correct the misspelled function, repoint
or restore the broken reference, fix the text-where-a-number-belongs, and widen the
#####column. Use Trace Precedents and Evaluate Formula where you're unsure. - (3 min) For the errors that are legitimately expected (a division that can hit zero, a
lookup that may not match), wrap them in
IFERRORorIFNAwith a sensible fallback. - (4 min) Tidy for performance and trust: convert the data to a Table
(Ctrl+T), replace any whole-column ranges with Table references, and move every
hardcoded assumption into a labeled Assumptions cell referenced with
$absolute refs. - (3 min) Protect it: unlock the data-entry cells, then Review โ Protect Sheet. Save to OneDrive so you have Version History as a backup.
- (2 min) Sanity-check: does every total look right? Cross-total one figure two ways.
๐ก Hint โ the broken starter & the fixes
BROKEN starter (type these to reproduce the errors):
A B C D
1 Item Price Qty Total
2 Widget 10 3 =B2*C2
3 Gadget n/a 2 =B3*C3 โ #VALUE! (text price)
4 Gizmo 15 0 =B4/C4 โ #DIV/0! (รท by 0)
5 Doohickey 8 5 =SUMM(...) โ #NAME? (misspelled)
6 Total =SUM(B2:B5) โ wrong: sums Price, not Total
Tax rate (hardcoded in a formula): =D6*0.2
FIXES:
- B3: replace the "n/a" price with a real number (or 0)
- D4: =IFERROR(B4/C4, 0) catch the expected divide-by-zero
(a real Total would be =B4*C4, which gives 0 with no error โ this row
divides on purpose, like a price-per-unit column, so you can practice
wrapping an error you expect)
- D5: =B5*C5 fix the misspelled function
- D6: =SUM(D2:D5) total the Total column, not Price
- Put the tax rate in a labeled cell, say G1 = 0.2, and use =D6*$G$1
- Convert A1:D5 to a Table (Ctrl+T); use Table refs
- Unlock data cells, then Review -> Protect Sheet
- Save to OneDrive for Version History
Work top to bottom: find the cause, fix it, then decide if IFERROR belongs. Don't paper
over a #NAME? or a wrong-range SUM with IFERROR โ those are real
bugs to fix.
โ Project Completion Checklist
- Every error value is gone, fixed at its root cause (not just hidden)
- Genuinely-expected errors are wrapped in
IFERROR/IFNAwith sensible fallbacks - Data is a Table; no stray whole-column or volatile ranges
- Hardcoded numbers moved to a labeled Assumptions cell with absolute refs
- Data-entry cells unlocked, sheet protected, workbook saved to OneDrive
- You cross-checked at least one total two different ways
๐ฏ Quick Quiz
Question 1: A cell shows #REF!. What most likely happened, and what's the right response?
Question 2: Which practice best keeps a workbook both fast and trustworthy?
Best Practices Recap
โ Do's
- Fix errors at the root first โ read the error value, trace the cause, then repair the data or reference.
- Reserve IFERROR for expected errors and prefer
IFNAwhen you only want to hide "no match." - Keep one source of truth for every assumption, in a labeled cell referenced with absolute refs.
- Save to OneDrive for automatic Version History, and protect sheets to guard your formulas.
โ Don'ts
- Don't hide errors you don't understand โ a masked
#REF!is a bug waiting to bite. - Don't hardcode numbers in formulas โ the reader can't see the assumption, and you can't update it once.
- Don't scatter whole-column ranges and volatile functions through a big workbook โ they'll grind it to a crawl.
- Don't trust a formula you haven't checked โ a clean look is not the same as a correct answer.
๐ก Pro Tips
- Ctrl+` (Show Formulas) is the fastest audit tool you have โ use it before you trust any inherited sheet.
- Before deleting a row or column, Trace Dependents on nearby cells so you don't create a wave of
#REF!errors.
๐ Learning Journal
Keep a learning journal as you work through this course โ a separate document, a note, or even a second worksheet right in the workbook you're building. After each lesson, take a few minutes to write down:
- Key concepts you learned
- Techniques that clicked for you
- Questions or confusion points to revisit
- Ideas you want to try with your own data
- Your progress and feelings about learning this โ including where your confidence grew
โ๏ธ This lesson's prompt: Which error value have you actually run into before, and did you understand it at the time? Now that you can trace and fix errors, how does your confidence with a "scary" broken spreadsheet compare to the start of this course? Write down one checking habit you'll adopt for good.
๐ Lesson Summary
๐ Key Takeaways
- Each error value points at a specific cause:
#DIV/0!(divide by zero),#VALUE!(wrong type),#REF!(deleted reference),#NAME?(unknown name),#N/A(no match),#SPILL!(blocked spill),#NUM!(invalid number), and#####(just a narrow column). - Trace and fix with Trace Precedents/Dependents, Evaluate Formula, Error Checking, and Show Formulas (Ctrl+`) โ find the root cause before hiding a symptom.
IFERROR(andIFNA) handle expected errors gracefully โ but don't use them to mask genuine bugs.- Performance: avoid whole-column and volatile formulas, use Tables and efficient functions, switch to Manual calc for huge files, and keep raw data separate from reports.
- Best practices: one source of truth, no hardcoded numbers, label & document, consistent structure, back up via OneDrive Version History, and protect sheets/lock cells โ all underpinned by a checking mindset.
๐ What You've Accomplished
You can now read any error Excel throws, trace it to its cause, and repair it โ and you know how to keep a big workbook fast and a shared one trustworthy. You audited and fixed a broken sheet end to end, which is exactly the skill that turns "I made a spreadsheet" into "I made a spreadsheet people can rely on." That reliability is the foundation your capstone dashboard will stand on.
โ Common Questions at This Stage
Should I just wrap every formula in IFERROR to be safe?
No โ that's a trap. IFERROR hides all errors, including real bugs like a
#REF! from a deleted column. Use it only for errors you expect and have thought through,
and prefer IFNA when you only want to hide a legitimate "no match." Fix the causes you didn't
expect.
My workbook got slow. What's the first thing to check?
Look for whole-column ranges (A:A) and lots of volatile functions (NOW,
TODAY, OFFSET, INDIRECT). Convert data to Tables so formulas reference
only real rows, and for very large files switch Calculation Options to Manual and recalc with F9
when you need to.
Is protecting a sheet the same as password-protecting the file?
No. Protect Sheet (Review tab) stops accidental edits to locked cells within a workbook โ great for guarding formulas while leaving data-entry cells open. Encrypting the whole file with a password (File โ Info) is separate and controls who can open it at all. They solve different problems; you can use both.
๐ญ Looking Ahead
Next is the finale โ Lesson 8.3: Capstone โ A Complete Interactive Dashboard. You'll bring the entire course together: a clean raw-data Table, a calculations layer with SUMIFS and lookups, PivotTables, and a polished dashboard sheet with KPIs, charts, sparklines, conditional formatting, and slicers for interactivity โ built on exactly the trustworthy, well-structured foundation you practiced here.
โ Before the Next Lesson
- Keep your repaired, protected sheet as a model of clean structure
- Make sure you're comfortable with Tables, SUMIFS, and PivotTables from earlier modules โ the capstone uses them all
- Write your Learning Journal entry for this lesson
๐ Additional Resources
- Microsoft Excel Help & Learning โ errors & formula auditing
- microsoft365.com โ open Excel for the web
- Microsoft Excel โ product overview
๐ Encouragement for the Journey
Being able to walk up to a broken spreadsheet and calmly fix it is a genuine superpower โ most people freeze
at the first #REF!. You don't anymore. One lesson to go, and it's the big one: your own live,
interactive dashboard. You're ready. ๐