A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Correct the row-39 test from L39<=L31 to L26<=L39, and add a final TRUE condition so IFS has a result when L26 falls outside every listed range.
=IFS(
@Employee_details[START DATE]=0,"",
AND(L26>=K30,L26<=L30),M30,
AND(L26>=K31,L26<=L31),M31,
AND(L26>=K32,L26<=L32),M32,
AND(L26>=K33,L26<=L33),M33,
AND(L26>=K34,L26<=L34),M34,
AND(L26>=K35,L26<=L35),M35,
AND(L26>=K36,L26<=L36),M36,
AND(L26>=K37,L26<=L37),M37,
AND(L26>=K38,L26<=L38),M38,
AND(L26>=K39,L26<=L39),M39,
AND(L26>=K40,L26<=L40),M40,
AND(L26>=K41,L26<=L41),M41,
TRUE,""
)
Two issues were present:
- The row-39 condition contains incorrect references Original:
Corrected:AND(L26>=K39,L39<=L31)AND(L26>=K39,L26<=L39) - There was no default result
IFSreturns#N/Awhen none of its conditions evaluates toTRUE. A finalTRUE,""returns a blank instead. You can replace the blank with a diagnostic message:
Microsoft documents this finalTRUE,"No matching range"TRUEcondition as the way to specify a default result forIFS.^1^
If #N/A remains after these corrections, check whether any referenced cell—particularly K30:L41, M30:M41, L26, or the start-date field—already contains an #N/A error. Formulas referring to cells that contain #N/A can propagate that error.^2^
References