Probably the easiest way to do this is to use the symbolic toolbox. You can construct a struct in which the field name is the name from column 1, and the value is the entry from column 2, and you define a symbolic variable with the same name as column 1. Then you can subs(TheFormula, TheStructOfValues) and the symbolic toolbox will do all of the lookups for you.
This approach has the advantage of not needing to change the formula.
However, I would not say that is the best way.
One better way would involve writing the formulas with the variable names as fields referencing a struct. You would construct a struct in which the field name is the name from column 1, and the value is the entry from column 2, and then you would evaluate the formula in terms of the struct.
Another better way would involve writting the formulas with the variable names looking like indexing into an array, such as M('speed')*M('time') instead of speed*time . Then you would construct a containers.Map with the indices taken from the first column of the excel, and the value taken from the second column.
Best Answer