Ok, so I did have a quick search but did not find an answer that does what I would like... I have a horrible feeling that it is simple.. :)
I would like a formula in cell D1 that will use cells A1, B1 and C1 to evaluate the test shown in B1. This is for producing questions.
The picture shows the data and results.
I have tried indirect() with no success and &, ie
=A1&B1&C1
Following formula could be used to evaluate the result of combination of A1, B1, C1
or
You can use the Evaluate method in excel VBA. Note that i'm using
.Value
on therng2
. This is because we want to use the displayed value of the cell (in the format in which it appears to the user lookins at the cell) rather than the underlying value that excel stores in the cell (which is what.value2
gives us).Note that there is a method of doing it using only worksheet functions, but it rather complicated compared to the VBA solution. An excellent descriptio of the old
Evaluate()
function and how to use it is given in this article.