I have a very long formula, that I currently have to repeat with different arguments.
For example, let's say the long formula is: "addDecimalOne(var)", which the formula adds 0.1 to "var".
I want to run that formula with 2 different vars, then sum it up.
Is there a way to use the LET formula (Excel 2021) to shorten that formula?
This is as close as I can get:
"=LET(var,1,addDecimalOne,(var+0.1+N("this simulates super long formula")),addDecimalOneA,addDecimalOne,var,2,addDecimalOneB,addDecimalOne,addDecimalOneA+addDecimalOneB)"
But Excel won't let me run that formula, as the following error appears due to the second "var": "You can't define the same name twice in a LET function."
Any advice? Note I'm using Excel 2021, so I have access to LET but not necessarily newer functions included in Excel 365.
For example, let's say the long formula is: "addDecimalOne(var)", which the formula adds 0.1 to "var".
I want to run that formula with 2 different vars, then sum it up.
Is there a way to use the LET formula (Excel 2021) to shorten that formula?
This is as close as I can get:
"=LET(var,1,addDecimalOne,(var+0.1+N("this simulates super long formula")),addDecimalOneA,addDecimalOne,var,2,addDecimalOneB,addDecimalOne,addDecimalOneA+addDecimalOneB)"
But Excel won't let me run that formula, as the following error appears due to the second "var": "You can't define the same name twice in a LET function."
Any advice? Note I'm using Excel 2021, so I have access to LET but not necessarily newer functions included in Excel 365.