How to include text (comment) in numeric formula?

C

curiousgeorge408

How can I include text (intended to be a comment) in a numeric
formula?

Effectively, I would like to write something like the following:

=A1 - A2 # this is the comment

My goal is for the comment to be visible only when I look at the cell,
but the cell retains its numeric quality. That is, in the example
above, the cell evaluates to A1 minus A2, and other numeric formulas
can refer to it straight-forwardly.

I know that I can do "insert comment", but that is not what I want.

I know I can do the following:

=A1 - A2 + N("this is the comment")

But I thought there is a more straight-forward way to do it.
 
F

FSt1

hi
not sure but try this
=A1 - A2 & " this is the comment"

the ampersand acts as a concatinator for the text.

Regards
FSt1
 
C

curiousgeorge408

not sure but try this
=A1 - A2  &  " this is the comment"

First, that makes the comment always visible in the cell, not "only
when I look at the cell" (i.e. the cell is selected). The cell does
not (simply) "evaluate to A1 minus A2".

Second, that changes the type of the cell to text, not "retains its
numeric quality", and "other numeric formulas can[not] refer to it
straight-forwardly". For example, =A3-1 results in a #VALUE! error,
if A3 has the formula you suggest.
 
R

RagDyer

You have another option.

Use the Data Validation "Input Message".

Does *not* mark the cell, and displays *only* when the cell is selected.
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
There is no other method AFAIK apart from the 2 methods
you already know.

Okay. Thanks for the confirmation.
 
D

Dana DeLouis

=A1 - A2 & " this is the comment"


Hi. One common method is the following, as N just returns 0.

=A2-A1 + N("Some Text")

--
HTH :>)
Dana DeLouis


not sure but try this
=A1 - A2 & " this is the comment"

First, that makes the comment always visible in the cell, not "only
when I look at the cell" (i.e. the cell is selected). The cell does
not (simply) "evaluate to A1 minus A2".

Second, that changes the type of the cell to text, not "retains its
numeric quality", and "other numeric formulas can[not] refer to it
straight-forwardly". For example, =A3-1 results in a #VALUE! error,
if A3 has the formula you suggest.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top