ID EN
#Dynamic array

ISOMITTED

Excel Functions

Check for optional arguments in LAMBDAs

Syntax

EXCEL
=ISOMITTED(argument)

Arguments

Parameter Description
argument The argument to test for.

Return Value

TRUE or FALSE

Details

The Excel ISOMITTED function is a helper function for LAMBDA functions to allow optional arguments. Inside a LAMBDA function, ISOMITTED will return TRUE when an argument has not been provided. ISOMITTED takes just one argument, argument, which should be the name of an argument defined in the parent LAMBDA function. To illustrate how ISOMITTED works, imagine a simple LAMBDA formula that adds 10 any given value. With the value 100 in cell A1, this formula will return 110: Next, we alter the formula to make both a and b variables: With 100 in A1, if we supply 10 for b, the formula returns 110. If we supply 20 for b, the formula returns 120. So far so good. Now let's say we want to make b optional, and we want b to default to 10 if not provided. To accomplish this, we can use ISOMITTED to chec

Examples

Step-by-step example

To illustrate how ISOMITTED works, imagine a simple LAMBDA formula that adds 10 any given value. With the value 100 in cell A1, this formula will retu

EXCEL
=LAMBDA(a,a+10)(A1) // returns 110
Step-by-step example

Next, we alter the formula to make both a and b variables:

EXCEL
=LAMBDA(a,b,a+b)(A1,10) // returns 110
=LAMBDA(a,b,a+b)(A1,20) // returns 120
Step-by-step example

Now let's say we want to make b optional, and we want b to default to 10 if not provided. To accomplish this, we can use ISOMITTED to check for b. We

EXCEL
IF(ISOMITTED(b),a+10,a+b) // test for b
Step-by-step example

Finally, we place the snippet above into the LAMBDA function as before. We also enclose b in square brackets [b] to follow the convention of optional

EXCEL
=LAMBDA(a,[b],IF(ISOMITTED(b),a+10,a+b))(A1) // returns 110
=LAMBDA(a,[b],IF(ISOMITTED(b),a+10,a+b))(A1,20) // returns 120
Worksheet Example

In the worksheet shown above, we are using the LAMBDA function to check password length. The LAMBDA takes two arguments, a and b. A is the password to

EXCEL
=LAMBDA(a,[b],IF(ISOMITTED(b),LEN(a)>=8,LEN(a)>=b))(B5)
Worksheet Example

Since b is not supplied, the passwords in column B are checked for a minimum length of 8 characters. The formula returns TRUE if a password is at leas

EXCEL
=LAMBDA(a,[b],IF(ISOMITTED(b),LEN(a)>=8,LEN(a)>=b))(B5,10)

See Also

LAMBDA LET