Google Sheets - Method to Evaluate a Custom Formula with Variables
I want to make a spreadsheet that can evaluate a formula that is built by the user. If you look up about evaluating what's in a sheet cell, you can find this thread: https://stackoverflow.com/questions/16303680/is-there-a-way-to-evaluate-a-formula-that-is-stored-in-a-cell which gives a function that will evaluate a math expression that gets typed into a single cell. I want to be able to do this, but also include "variable names" in the cell content. The values for the variables would be stored in a range elsewhere in the spreadsheet. So for example: Length / 0.8 * Width where values for Length and Width will be defined in a range. I have been able to get something that works if I only have 1 variable name, but handling multiple variable names is proving very difficult to me. Will I have to resort to using the scripting engine to do this?