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)
- Regina_HenschelMar 14, 2026Copper Contributor
So you do not use TYPE directly in the sheet, but inside a named expression that is intended to be used by someone else?
- Patrick2788Mar 15, 2026Silver Contributor
That's the short of it.
The ability to supply functions like this ETA arrangement for example:
=BYROW(array,SUM)Is a recent change from how things have been for a long time. This same ETA arrangement can be used in Lambdas and that's where TYPE comes in to check the input.