Cell Error Types
- 2 minutes to read
If a cell contains a formula that cannot be calculated correctly, the cell’s value (CellRange.Value) is of the error type (the CellValue.IsError property value is true). To access information on an error contained in a cell, use the members of the ErrorValueInfo object returned by the CellValue.ErrorValue property. The ErrorValueInfo.Type returns the ErrorType enumeration member that specifies the error type, the ErrorValueInfo.Name property returns the error name displayed in a cell, and the ErrorValueInfo.Description property returns the cause of the error.
Error Type | Error Name | Error Description | Example |
---|---|---|---|
#DIV/0! | Division by zero! | cell. cell. | |
#NAME? | Function does not exist. | cell. cell. | |
#N/A | The value is not available to a function or formula. | cell. cell. | |
#NULL! | The specified intersection includes two ranges that do not intersect. | cell. | |
#NUM! | Invalid numeric values in a formula or function. | cell. | |
#REF! | Cell reference is not valid. | A formula uses a reference to a cell, and then the column containing this cell is deleted: cell. worksheet. | |
#VALUE! | The value used in the formula is of the wrong data type. | cell. A formula refers to a blank cell that is not actually empty (it contains an empty string): worksheet[“A1”]. cell. To fix the error in this case, specify an empty value for a cell as shown in the How to: Clear Cells of Content, Formatting, Hyperlinks and Comments example. |