# LAMBDA.EVALUATE  	LAMBDA.EVALUATE is equivalent to the old Excel 4.0 macro EVALUATE with some limitations.



## tboulden (Mar 7, 2021)

The old Excel 4.0 macro EVALUATE has been available via the Name Manager for some time, but was hard to use. Now with LAMBDA we can name a function that uses EVALUATE and use that function in a sheet.

Some limitations:

can only be instantiated from Name Manager and workbook must be xlsm
string to evaluate must be fewer than 256 chars.
if the formula would have required array (Ctrl+Shift+Enter) entry before, you may need to coerce/dereference the formula
LAMBDA.EVALUATE can't evaluate another reference to LAMBDA.EVALUATE
probably others I haven't quite come across or figured out just yet
I've named my implementation with "λ_EVAL" for brevity, but figure LAMBDA.EVALUATE makes more sense as an intro. I've used this to help me debug LET/LAMBDA functions as I've been wrapping my head around how the functions work. It loses some utility as formulas get longer, but I use REPLACESTRINGS to shorten formula length if needed while building/testing.

Link to original on Microsoft Excel discussion board: Legacy EVALUATE in LAMBDA: Build/Test LAMBDAs from Sheet

LAMBDA_Testing.xlsmABCDEF1Can only be instantiated from Name Manager, not from cell/sheet, and workbook must be xlsm2=LAMBDA(x,EVALUATE(x))34LengthEntry TextFormula TextlambdaEVALFormula Text58FACT(10)3628800=λ_EVAL(C5)6718LET(a,20,b,30,a+b)50=λ_EVAL(C7)89LET(10a,20,11b,30,12a+b13)1418LET(a,20,b,30,a+b)=TEXTJOIN("",TRUE,C9:C13)50=λ_EVAL(C14)1516LAMBDA(17x,18x+119)2013LAMBDA(x,x+1)=TEXTJOIN("",TRUE,C16:C19)8=λ_EVAL(C20&"(7)")Examples and LimitationsCell FormulasRangeFormulaA5,A20,A14,A7A5=LEN(C5)E5,E14,E7E5=λ_EVAL(C5)F5,D20,F20,D14,F14,F7F5=FORMULATEXT(E5)C14C14=TEXTJOIN("",TRUE,C9:C13)C20C20=TEXTJOIN("",TRUE,C16:C19)E20E20=λ_EVAL(C20&"(7)")


----------



## tboulden (Mar 7, 2021)

Note I've tested several other old Excel 4.0 XLM macro functions and got the following working using LAMBDA: FILES, GET.WORKBOOK, NAMES, GET.NAME. I'm sure there are many others that work as long as they are informational and don't try to manipulate other objects. I'm not well-versed enough to know how much utility these provide, so don't know that they need there own thread.


----------

