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
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| arg1 | Required | ApiRange | string | number | boolean | ApiName | The 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"));