Google Sheets Formula Corrections: Fix Errors Fast
Google Sheets formula corrections fix broken or wrong results in your spreadsheets. You enter the formula you think should work, and this guide explains why it returns an error or an unexpected value, then shows the exact steps to correct it. Whether you see #REF!, #VALUE!, or just a number that looks off, the fixes below cover the most common causes and solutions.
Why Formulas Break in Google Sheets
Formulas in Google Sheets fail for a handful of recurring reasons. The most frequent is a typo in the function name or cell reference. Another is mismatched parentheses—each opening parenthesis needs a closing one. A third common cause is using the wrong argument type, such as feeding text into a function that expects a number. Finally, structural issues like deleted rows or columns can break references, producing #REF! errors.
Understanding the error message is the first step to a fix. Google Sheets displays a small triangle in the corner of the cell with the error, and clicking it shows a description. The description often says exactly what is wrong, like “Function DIVIDE parameter 2 cannot be zero.” Reading that message saves time compared to guessing.
Common Error Messages and Their Fixes
Here are the errors you will see most often and what to do about each:
- #DIV/0! – You are dividing by zero or an empty cell. Fix: check the divisor cell, or use IFERROR to show a blank or custom message.
- #N/A – A lookup function (VLOOKUP, HLOOKUP, MATCH) cannot find the value. Fix: confirm the search key exists in the lookup range, and ensure the range is sorted if you are using approximate match.
- #NAME? – The function name is misspelled, or you used text without quotes. Fix: spell the function correctly, and put any literal text in double quotes.
- #REF! – A reference is invalid, often because a row or column was deleted. Fix: undo the deletion, or rewrite the formula to reference the correct cells.
- #VALUE! – The wrong type of value is used, like adding text to a number. Fix: use NUMBERVALUE or VALUE to convert text, or correct the cell contents.
- #NUM! – A calculation produces a number too large or too small, or a function like SQRT gets a negative input. Fix: check your inputs and use ABS or IF to handle negatives.
How to Trace and Fix a Broken Formula
When a formula returns an error, follow these steps to locate the problem:
- Click the cell with the error. The formula bar shows the formula. Look for obvious typos first.
- Use the error message: hover over the triangle or click the cell and look at the help text. It often names the exact function and argument.
- Check each referenced cell. Click the cell and press F2 (or double-click) to see the formula with colored ranges. Verify each range is correct.
- Test the formula in parts. For example, if you have
=A1+B1*C1, first evaluate=B1*C1in another cell to see if that part works. - Use the Evaluate formula feature: select the cell, go to Extensions > Add-ons > Get add-ons and search for “Evaluate Formula” (or use the built-in trace tools in the menu under Tools > Formula auditing). This shows each calculation step.
If the formula still fails, rebuild it from scratch in a new cell. Copying a broken formula often carries the error forward.
Fixing Wrong Results (Not Errors)
Sometimes a formula returns a number but it is not the number you expect. This usually comes from one of three issues:
- Cell formatting – The cell is formatted as text, so the formula is not calculated. Fix: select the cell, go to Format > Number > Automatic.
- Hidden rows or filtered data – Functions like SUM and AVERAGE ignore hidden rows when a filter is active, but not when rows are manually hidden. Fix: check if a filter is on, and use SUBTOTAL if you need to respect filters.
- Relative vs absolute references – When you copy a formula, relative references change. Fix: add dollar signs ($A$1) to lock references that should stay fixed.
Another frequent cause is using the wrong function. For example, COUNT counts numbers only, while COUNTA counts non-empty cells. If you think you are counting text entries and get a low number, you may have used COUNT instead of COUNTA.
Using IFERROR and IFNA to Clean Up
To prevent errors from showing to others, wrap your formula with IFERROR. For example:
=IFERROR(VLOOKUP(A2, B:C, 2, FALSE), "Not found")
This displays “Not found” instead of #N/A. IFNA is a narrower version that only catches #N/A errors, leaving other errors visible for debugging. Use IFNA when you want to know about other problems.
Do not overuse IFERROR—it hides all errors, including ones you might want to fix. Use it only after you have confirmed the formula works, or when the error is expected (like a missing lookup value).
Comparisons: Google Sheets vs Excel Formulas
Most formulas work identically in Google Sheets and Excel, but there are differences. Google Sheets uses =SUM(A1:A10) just like Excel, but some functions have different names (e.g., REGEXEXTRACT is Google-only). Array formulas in Google Sheets require ARRAYFORMULA wrapping, while Excel uses dynamic arrays automatically. Also, Google Sheets treats semicolons as argument separators in some locales, which can cause #VALUE! errors if you switch between the two.
If you copy a formula from Excel to Sheets, check for unsupported functions. Google Sheets has a built-in converter that suggests replacements, but it is not perfect. Always test after pasting.
Preventing Formula Errors
Good habits reduce the need for corrections:
- Use named ranges (Data > Named ranges) instead of cell references like A1:B2. They are easier to read and less likely to break.
- Keep data and formulas on separate sheets to avoid accidental deletions.
- Use data validation to restrict inputs, so users do not enter text where a number is expected.
- Document complex formulas with comments (Insert > Comment) so others understand the logic.
- Test formulas with small, known datasets before applying to large ranges.
Frequently Asked Questions
Why does my formula show the formula text instead of the result?
This happens when the cell is formatted as plain text. Select the cell, go to Format > Number > Automatic, then re-enter the formula by pressing F2 and Enter. If the whole column is text, use Data > Split text to columns or use the Find and Replace to change formatting.
How do I fix #REF! after deleting a row?
Undo the deletion (Ctrl+Z or Cmd+Z) if possible. If not, rewrite the formula to reference the correct cells. To prevent future #REF! errors, avoid deleting rows that are directly referenced by formulas; instead, clear the contents.
Why is my VLOOKUP returning #N/A even though the value exists?
Check that the lookup value is exactly the same—no extra spaces, different data types (text vs number), or hidden characters. Use TRIM and CLEAN on the lookup value and the lookup column. Also ensure the range is correct and that you are using FALSE for exact match.
Can I correct a formula in multiple cells at once?
Yes. Select the range of cells with errors, type the corrected formula, and press Ctrl+Enter (or Cmd+Enter on Mac) to fill all selected cells. Alternatively, use Find and Replace (Ctrl+H) to replace part of a formula, like changing a function name.
What is the difference between IFERROR and IFNA?
IFERROR catches every error type (#N/A, #VALUE!, #REF!, etc.), while IFNA only catches #N/A errors. Use IFNA when you want other errors to remain visible for debugging, and IFERROR when you want to hide all errors.
Why does my formula work in one row but not another?
This usually means a relative reference is shifting incorrectly. Check if the formula uses relative references (A1) that change when copied. If you need a fixed reference, add dollar signs ($A$1). Also check that the data in the failing row is the correct type.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.