Excel Functions – Formula Errors in Excel

Date:

Share post:

Formula Errors in Excel: Excel is a powerful tool for data analysis, but it can be frustrating when your formulas don’t work as expected. One common cause of problems is errors in your formulas. Excel uses a variety of error codes to indicate what went wrong.

Introduction

Here are some of the most common Excel formula errors:

  • #DIV/0! This error occurs when you divide a number by zero.
  • #N/A This error occurs when a formula can’t find a value it’s looking for.
  • #REF! This error occurs when a cell that a formula refers to has been deleted or moved.
  • #NULL! This error occurs when a formula contains an empty cell reference.
  • #VALUE! This error occurs when a formula contains an invalid value or data type.

This chapter teaches you how to deal with some common formula errors in Excel. Let’s start simple.

#####

When your cell contains this error code, the column isn’t wide enough to display the value.

Formula Errors in Excel: NOT WIDE ENOUGH ERROR

1. Click on the right border of the column A header and increase the column width.

FIX NOT WIDE ENOUGH ERROR

Tip: double click the right border of the column A header to automatically fit the widest entry in column A.

#NAME?

The #NAME? error occurs when Excel does not recognize text in a formula.

Formula Errors in Excel: NAME ERROR

1. Simply correct SU to SUM.

FIX NAME ERROR

#VALUE!

Excel displays the #VALUE! error when a formula has the wrong type of argument.

Formula Errors in Excel: VALUE ERROR

1a. Change the value of cell A3 to a number.
1b. Use a function to ignore cells that contain text.

See also  Excel Basics - Worksheet in Excel

FIX VALUE ERROR

#DIV/0!

Excel displays the #DIV/0! error when a formula tries to divide a number by 0 or an empty cell.

Formula Errors in Excel: DIV ERROR

1a. Change the value of cell A2 to a value that is not equal to 0.
1b. Prevent the error from being displayed by using the logical function IF.

FIX DIV ERROR

Explanation: if cell A2 equals 0, an empty string (“) is displayed. If not, the result of the formula A1/A2 is displayed.

#REF!

Excel displays the #REF! error when a formula refers to a cell that is not valid.

1. Cell C1 references cell A1 and cell B1.

REF ERROR EXAMPLE

2. Delete column B. To achieve this, right click the column B header and click Delete.

DELETE COLUMN

3. Select cell B1. The reference to cell B1 is not valid anymore.

REF ERROR RESULT

4. To fix this error, you can either delete +#REF! in the formula of cell B1 or you can undo your action by pressing CTRL + z

#N/A

The #N/A error appears when the VLOOKUP function (or XLOOKUP, MATCH, etc.) can’t find a match.

1. In the example below, ID 28 cannot be found.

2. Use the IFNA function to replace the #N/A error with a friendly message.

#NUM!

Excel shows the #NUM! error when a formula contains invalid numeric values.

1. For example, the SQRT function below cannot calculate the square root of a negative number.

2. Change the number in cell A1 to a positive number.

FIX NUM ERROR

#NULL!

The intersect operator (single space) returns the intersection of two ranges. When two ranges don’t intersect, Excel displays the #NULL! error.

1. The formula below returns #NULL! because the two ranges don’t intersect.

NULL ERROR

2. The formula below doesn’t return the #NULL error.

See also  Excel Example - Skip Blanks in Excel

FIX NULL ERROR

Note: =SUM(F2:G2) produces the exact same result!

#SPILL!

If something is blocking a spill range, Excel displays the #SPILL! error.

1. Simply empty cell C6 to fix the #SPILL error.

FIX SPILL ERROR

Note: this dynamic array function, entered into cell C1, fills multiple cells. Wow! This behavior in Excel 365/2021 is called spilling.

Tips

If you see one of these error codes, the first step is to troubleshoot the problem. Here are some tips for troubleshooting Excel formula errors:

  • Check your spelling. Formulas are case-sensitive, so make sure you’ve spelled all of the function names and cell references correctly.
  • Check your data types. Make sure that the values in your cells are the correct data types for the functions you’re using.
  • Check your cell references. Make sure that the cells you’re referencing actually exist.
  • Check for circular references. A circular reference occurs when a formula refers to itself. This can cause Excel to give inaccurate results or stop working altogether.

If you’ve checked all of these things and you’re still getting an error, you can use the ERROR.TYPE function to find out more information about the error. The ERROR.TYPE function returns a number that represents the type of error that occurred. You can then use this number to look up the error message in the Excel help file.

Once you’ve identified the cause of the error, you can fix it and your formula should start working correctly.

Avoiding Formula Errors

The best way to avoid formula errors is to be careful when you’re creating and editing formulas. Here are some tips for avoiding formula errors:

  • Formula Auditing is useful tool to find and fix errors.
  • Use the IFERROR function to trap and handle errors.
  • Use the ERROR.TYPE function to get more information about errors.
  • Back up your work regularly so that you can recover from errors.
See also  Excel Functions - Round Functions in Excel

By following these tips, you can help to ensure that your Excel formulas are accurate and error-free.

Next Chapter: Array Formulas

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Related articles

Excel Example – Subtract in Excel

Subtract There's no SUBTRACT function in Excel. However, there are several ways to subtract numbers in Excel. Are you...

Excel Example – Most Used Functions in Excel

Most Used Functions Let's check out the 10 most used Excel functions. Visit our section about functions for detailed...

Excel Example – ROW function in Excel

The ROW function in Excel returns the row number of a reference. For example, =ROW(C4) returns 4. The...

Excel Example – Move Columns in Excel

To move columns in Excel, use the shift key or use Insert Cut Cells. You can also change...