How to include text (comment) in numeric formula?

  • Thread starter Thread starter curiousgeorge408
  • Start date Start date
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.
 
hi
not sure but try this
=A1 - A2 & " this is the comment"

the ampersand acts as a concatinator for the text.

Regards
FSt1
 
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.
 
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.
 
=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.
 
Back
Top