1. Calculate percentage with optional max score
| Student | Subject | Assignment | Score | Max Score |
| Alice | Math | HW1 | 85 | 100 |
| Bob | Math | HW1 | 78 | 100 |
| Alice | History | Essay1 | 90 | 100 |
| Bob | History | Essay1 | 85 | 100 |
| Charlie | Math | HW1 | 92 | 100 |
=LET(
pctLambda, LAMBDA(score, maxScore,
IF(ISOMITTED(maxScore), score/100, score/maxScore)
),
pctLambda(85, )
)
Result: 0.85
The LET creates a LAMBDA named pctLambda that expects a score and an optional maxScore. In the call pctLambda(85, ) the second argument is omitted, so ISOMITTED returns TRUE and the IF branch divides 85 by the default 100, yielding 0.85. If a maxScore had been supplied, the division would use that value instead.
2. Optional subject filter for a grade lookup
| Student | Subject | Assignment | Score | Max Score |
| Alice | Math | HW1 | 85 | 100 |
| Bob | Math | HW1 | 78 | 100 |
| Alice | History | Essay1 | 90 | 100 |
| Bob | History | Essay1 | 85 | 100 |
| Charlie | Math | HW1 | 92 | 100 |
=LET(
filterLambda, LAMBDA(subject,
IF(ISOMITTED(subject),
FILTER(A2:E6, (A2:A6="Alice")),
FILTER(A2:E6, (A2:A6="Alice")*(B2:B6=subject))
)
),
filterLambda("Math")
)
Result: AliceMathHW185100
The LAMBDA filterLambda takes an optional subject argument. When called with "Math", the argument is supplied, so ISOMITTED returns FALSE and the FILTER includes the subject condition, returning only Alice's Math rows. If the call were filterLambda() with no argument, ISOMITTED would be TRUE and the FILTER would ignore the subject, returning all of Alice's records regardless of subject.
3. Personalised message when student name omitted
| Student | Subject | Assignment | Score | Max Score |
| Alice | Math | HW1 | 85 | 100 |
| Bob | Math | HW1 | 78 | 100 |
| Alice | History | Essay1 | 90 | 100 |
| Bob | History | Essay1 | 85 | 100 |
| Charlie | Math | HW1 | 92 | 100 |
=LET(
msgLambda, LAMBDA(student,
IF(ISOMITTED(student), "Student name missing", "Report for " & student)
),
msgLambda()
)
Result: Student name missing
msgLambda is defined to accept a student name, but the call msgLambda() provides no argument, making the parameter omitted. ISOMITTED therefore returns TRUE, causing the IF to choose the error-message branch. If a name such as "Bob" were supplied, the function would concatenate "Report for Bob" instead.