SpreadJS 14
Best Practices / Simplify Complex Formula
In This Topic
    Simplify Complex Formula
    In This Topic

    Sometimes, some complex formulas are used because it is difficult to remember certain actions like what a specific range or cell reference refers to, what calculation is in progress, copying/pasting the same expression etc. In such cases, it is recommended to use 'LET function', which gives a meaningful context to complex formulas.

    LET function helps you to declare and assign values to variables inside a formula. Once a variable is named, it can be assigned a static value or simply a value based on the calculation. This allows a formula to refer to a variable by name as often as needed, while the value of the variable is assigned in one place only. The variables are named and assigned values in pairs (name1/value1, name2/value2, etc.) and this function can handle up to 126 name/value pairs.

    For further implementation, refer to LET function.