Forum Discussion
Regina_Henschel
Mar 13, 2026Copper Contributor
Looking for use cases of function TYPE
What do you use the TYPE function for? I’m not looking for a general explanation of what the TYPE function can do—I already know that. For example, why do you use the TYPE function instead of functio...
Patrick2788
Mar 13, 2026Silver Contributor
TYPE is helpful for two things mostly:
64 - array detection (can also use ROWS and COLUMNS for dimension check)
128 - compound data
This is a basic example of using TYPE to validate the function input of a Lambda:
MyLambda=
LAMBDA(
array,
[function],
LET(
// Check optional function input, default to SUM if omitted
function, IF(ISOMITTED(function),SUM,function),
// Compound data - TYPE = 128 - valid function
InValidFn?, TYPE(function) <> 128,
// Halt function if supplied function is invalid
IF(InValidFn?,"#INVALID-FUNCTION!",function(array))));
// Sheet level formula: =MyLambda(arr,AVERAGE)