Skip to main content

Error Types

  • 2 minutes to read

If the Spreadsheet control cannot calculate the result of a cell formula, the Cell.Value.ErrorValue property returns an object of the ErrorValueInfo type that contains information about the error. Use the object’s properties to get information about the error’s Type, Name (displayed in a cell), and Description.

Type

Name

Description

Example

DivisionByZero

#DIV/0!

Division by zero!

cell.Formula = "=A1/B2"

The B2 cell is blank.

Name

#NAME?

Function does not exist.

cell.Formula = "=FALS";

The function name is spelled incorrectly.

cell.Formula = "=SUM(A1B2)";

A colon (:) is missed in the cell range reference.

NotAvailable

#N/A

The value is not available to a function or formula.

cell.ArrayFormula = "=SUM(A1:A5;A1:B3)";

An array formula‘s arguments consist of different numbers of elements.

Null

#NULL!

The specified intersection includes two ranges that do not intersect.

cell.Formula = "=SUM(A1:A5 E6:E8)";

The specified ranges do not intersect.

Number

#NUM!

Invalid numeric values in a formula or function.

cell.Formula = "=SQRT(-16)";

The square root of a negative number cannot be calculated.

Reference

#REF!

Cell reference is not valid.

cell.Formula = "=5+D2";

worksheet.Columns["D"].Delete();

A referenced cell is deleted.

Value

#VALUE!

The value used in the formula is of the wrong data type.

cell.Formula = "=SUM(""text"", 6)";

The SUM function requires numeric arguments.

Online Demo

Cell Value