Using calculation in a cell like a variable

M

mtuller

This seems so basic to me, but I want to take the calculation of a
formula in a cell, let's say the result of some financial calculation
and then later on I have some text explaining what I did. Something
like this:

The answer to the question is --the value of cell C1--

That way if any information changes in the formula, you don't have to
type it into the text.
 
E

Earl Kiosterud

M,

If you want the text and the formula result to appear in the cell, try this. Select the
cell. Format - Cells - Number tab - Custom. Whatever is currently in the Type box, add
this:

"The answer to the question is " (followed by the original format code).

E.g.:

"The answer to the question is" General
"The answer to the question is" 0.00

You can also have text after the formula result:

"The answer to the question is" 0.00 "don't you know"

The cell will still be considered to contain a number, so you can refer to it in other
formulas.
 
J

JE McGimpsey

One way:

Format/Cells/Number/Custom

"The answer to the question is "0.00

You could also use

="The answer to the question is " & TEXT(<calc here>,"0.00")

Note, however, that you wouldn't then be easily able to use the result
in subsequent formulae.
 
M

mtuller

I think both of you are misunderstanding. I want the value of a cell
mixed in with text. So if I have a cell that has a formula in it, and
the result of that formula is $1250.34. I want to have some text that
says, "The answer to the problem is $1250.34" The $1250.34 would not
be typed in manually, but rather be the value of the cell that
contained the formula. That way if I changed the formula in the cell,
the amount in the text would have too.

I hope that makes more sense.
 
J

JE McGimpsey

mtuller said:
I think both of you are misunderstanding.

I think you should try the suggested solution before you decide that
there's a misunderstanding <g>.
 
Top