Comment in formula

A

Andrea

When I have a formula like =VLOOKUP(E906,'COST
SHEET'!A:Q,17,FALSE)*I906*W906

I would like to be able to put a comment like "Q17 equals sector 3 and
pricing is per litre".

In crystal I can do this by putting // before the comment, what can I use to
achieve this in excel -

Please explain by showing me example of formula to achieve the above as I am
a novice and not technical.

Many Thanks
 
E

Elkar

No, there is no way to insert a comment into an Excel formula. However,
there are a couple methods to get around that.

If you know that your formauls will only be returning numbers (not text),
you could use:

=A1+A2 + N("Your comment here")

The N function returns the numerical value of the enclosed argument. Since
the comment is text, it returns 0 which can safely be added to your existing
formula without chaning the outcome. If your formula returns text however,
this will not work.

Another option, although not very ellegant, would be to use an IF statement
that never evaluates to False, and place your comment in the False area, like:

=IF(1=1,A1+A2,"Your comment here")

Since 1=1 will ALWAYS be true, the IF function will ALWAYS return your
original formula, and thus you're free to put whatever you want in the False
portion.

HTH
Elkar
 
T

T. Valko

If you know that your formauls will only be
returning numbers (not text),

And if the formula only returns text:

=IF(A1>50,"Yes","No")&T(N("your comment here"))
 
A

Andrea

That's Great - Thank you very much, really appreciate you taking the time to
help me !
 

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