Then you need to use a function. Copy the code below into a module in your
workbook, and use it like
=ShowFormula(A1)
HTH,
Bernie
MS Excel MVP
Function ShowFormula(inCell As Range) As String
ShowFormula = Mid(inCell.Formula, 2, _
Len(inCell.Formula)) & " = " & inCell.Value
End Function
"BoneR" wrote in message
...
Thanks Bernie, I have used string concatination in the past but when the
expressions get long and complex it becomes very tedious. What I had in
mind
was a more general function that actually looked at the cell containing
the
maths expression directly.
"Bernie Deitrick" wrote:
To show addition of the values in A1 and A2, use the formula
= A1 & " + " & A2 & " = " & A1 + A2
Of course, you might want to have a check that A1 and A2 are filled, but
you
get the idea.
HTH,
Bernie
MS Excel MVP
"BoneR" wrote in message
...
In Excel I would like to display the values that go into a formula -
in
addition to the answer itself. This is to mimic the way hand
calculations
would be set out on paper. In other words I'd like a function that
takes
the
maths expression within a cell and returns with a string where the
cell
references have been replaced with actual values.
|