Calc IFNULL function

The IFNULL function returns the first argument if it is not null, otherwise it returns the second argument.

Help CentreFunctions & Formulas

For a full list of available calculation functions, please read What calculation functions are supported.

This article describes the formula syntax and usage of the IFNULL function.


Description

Returns the first argument if it is not null, otherwise it returns the second argument.


Syntax

IFNULL(expression, value_if_null)


The IFNULL function syntax has the following arguments:
  • expression - Required. The expression to test for null.
  • value_if_null - Required. The value to return if expression is null.

Example

FormulaDescriptionResult
=IFNULL(A1, "No Value")If A1 is null, returns "No Value".No Value
=IFNULL(5, 10)If 5 is not null, returns 5.5

Errors

For a full list of formula errors, please read Formula errors.


Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.