IFBLANK (Value, ValueIfBlank) IFBLANK (Value; ValueIfBlank)

Value

The value to return if it is not blank.

ValueIfBlank

The value to return if the value parameter is blank.

Returns

The first parameter if it is not blank and the second parameter otherwise.

Returns a value unchanged if it is not blank and a different value otherwise. IFBLANK (Value1, 4) IFBLANK (Value1; 4) returns Value1 if it is not blank, and 4 otherwise.

The formula above is equivalent to this formula, but IFBLANK does not require the value to be repeated:

IF ( ISDEFINED (Value1), Value1, 4)
IF ( ISDEFINED (Value1); Value1; 4)

This function is not commonly supported by spreadsheets.

IFBLANK and arrays

Applying IFBLANK to an array yields an array with the same size as the original array, where blank elements are replaced with the second parameter and all other elements are returned unchanged.

This formula returns the array { 1, 2, - 1, 4 }{ 1; 2; - 1; 4 }, as the third array element is blank:

IFBLANK ({ 1, 2, BLANK (), 4 }, - 1)
IFBLANK ({ 1; 2; BLANK (); 4 }; - 1)

Examples

IFBLANK (Value1, 4)
IFBLANK (Value1; 4)

Returns Value1 if it is not blank, and 4 otherwise.

IFBLANK ({ 1, 2, BLANK (), 4 }, - 1)
IFBLANK ({ 1; 2; BLANK (); 4 }; - 1)

Returns the array { 1, 2, - 1, 4 }{ 1; 2; - 1; 4 }. All array elements are returned unchanged, except for the third array element. That element is blank, and is replaced with -1.

fxEngine Shell Want this in your own terminal? A standalone version is coming. Get notified.
Loading fxEngine Shell