Skip to main content

ISNA

Checks whether a value is #N/A, and returns - true or - false.

Syntax

expression.ISNA(arg1);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | string | number | boolean | ApiNameThe value to test. The value can be an empty cell, error, logical value, text, number, range, or range name.

Returns

boolean

Example

Identify whether a cell displays an N/A error in a spreadsheet.

// How do I check if a cell contains the N/A error in a spreadsheet?

// Use a function to find cells with N/A errors and handle them appropriately in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.ISNA("#N/A"));
worksheet.GetRange("A2").SetValue(func.ISNA(255));
worksheet.GetRange("A3").SetValue(func.ISNA("www.example.com"));