NA Function (LibreOffice Calc)
The NA function in LibreOffice Calc returns the #N/A error. It is used to signal missing data, unavailable values, or intentional 'not found' states in formulas and datasets.
Compatibility
▾| Excel | ✔ |
| Gnumeric | ✔ |
| Google_sheets | ✔ |
| Libreoffice | ✔ |
| Numbers | ✔ |
| Onlyoffice | ✔ |
| Openoffice | ✔ |
| Wps | ✔ |
| Zoho | ✔ |
What the NA Function Does ▾
- Returns the
#N/Aerror - Used to mark missing or unavailable data
- Helps distinguish “not found” from other error types
- Works with formulas, references, and conditional logic
It is designed to be simple, explicit, and semantically meaningful.
Syntax ▾
NA()
Arguments
- None.
Basic Examples ▾
Return the #N/A error
=NA()
Use NA to mark missing data
=IF(A1=""; NA(); A1)
Use NA in charts to skip points
=IF(A1=0; NA(); A1)
Charts ignore #N/A values.
Use NA to indicate lookup failure manually
=IF(B1=""; NA(); B1)
Advanced Examples ▾
Use NA with MATCH to signal missing values
=IF(ISNA(MATCH(A1; B1:B10; 0)); NA(); MATCH(A1; B1:B10; 0))
Use NA in array formulas to skip invalid entries
=IF(A1:A10<0; NA(); A1:A10)
Use NA to prevent accidental calculations
=IF(A1=""; NA(); A1 * 2)
Use NA for debugging
=IF(A1>100; NA(); A1)
Use NA to force conditional formatting
=IF(A1="Missing"; NA(); A1)
Use NA to mark incomplete rows
=IF(COUNTA(A1:C1)<3; NA(); "OK")
Edge Cases and Behavior Details ▾
NA always returns #N/A
=NA()
No arguments allowed.
NA is distinct from other errors
- #N/A means “not found” or “missing”
- Other errors indicate invalid formulas or references
Charts ignore #N/A values
This makes NA ideal for skipping points.
NA is caught by ISNA, ISERROR, and ISERR differently
- ISNA → TRUE
- ISERR → FALSE
- ISERROR → TRUE
NA is not text, not numeric, not blank
=TYPE(NA()) → 16 (error)
NA is useful for placeholder logic
Better than empty strings when you need explicit missing‑data signaling.
Common Errors and Fixes ▾
Err:501 — Wrong number of arguments
Occurs when:
=NA("text")
=NA(1)
NA takes no arguments.
NA used incorrectly in arithmetic
=NA() + 5
Returns #N/A — expected behavior.
NA used where blank is expected
Use "" instead of NA() when you want a visually empty cell.
Best Practices ▾
- Use NA to explicitly mark missing or unavailable data
- Use NA in charts to skip invalid points
- Use NA with MATCH and VLOOKUP for lookup workflows
- Use ISNA to detect NA values cleanly
- Avoid using NA when you want a blank cell — use "" instead
NA is the cleanest way to signal “missing” — it’s unambiguous, chart‑friendly, and easy to detect with ISNA.
Related Patterns and Alternatives ▾
- Use ISNA to detect #N/A
- Use IFNA to handle #N/A gracefully
- Use ISERROR for broad error detection
- Use "" for visually blank cells
- Use IF to build missing‑data logic
By mastering NA and its companion functions, you can build clear, explicit, and error‑aware spreadsheets in LibreOffice Calc.