how to get formula content of a cell?

M

muster

For example

A1: =b2+c2, result is 5

I'd like to get "=b2+c2", not 5, without VBA.

Thank you.
 
A

Alan

Press Ctrl and ` together (key to the left of 1 on the left side of the
keyboard),
Regards,
Alan.
 
K

Kevin Vaughn

I interpreted this differently than the other 2 responders to your question.
If my interpretation is correct, there is absolutely no way (that I know of)
to get the formula contents of a cell (returned into another cell; this is
where my interpretation differs,) without using VBA.

I qualified my answer to include the phrase that I know of just in case.
Due to the slight possibility that someone will pipe up with an answer that I
never heard of. But if such a solution exists, I wonder why I haven't heard
of it before.
 
K

Kevin Vaughn

I'm glad I qualified my answer. However, I believe that there is a potential
problem with this solution. I tested it and it did work, however, this is
probably a function leftover from Excel's previous macro language (the name
of which escapes me, something like xmla,) which I have read can cause (I
believe) a crash if copied to other worksheets in certain versions of Excel
(something like that.) If someone reads this and knows the exact scenario,
hopefully they'll respond with the specifics.
 
R

Ragdyer

From XL02 forward, the bug was fixed.

I've used it in past versions, although not on any WB that was put on the
LAN.

Can never trust users to listen to, and follow instructions, especially
pertaining to fatal consequences.

In fact, I've suggested it's use in a post just today, but prefixed it with
the caveat of pre-XL02 usage.
 
R

RagDyeR

AFAIK Peo, *everything* was fixed!

Copying from WB to WB is no longer a problem.
--

Regards,

RD
----------------------------------------------------------------------------
-------------------
Please keep all correspondence within the Group, so all may benefit !
----------------------------------------------------------------------------
-------------------

The bug was fixed so it wouldn't crash but I believe you can't copy the
formula to another sheet


--


Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
 
R

RagDyeR

You would cause XL to crash *IF* you attempted to *COPY* the formula to
another WB.

Using it is *not* a problem.
Creating (re-writing) it in another WB is *not* a problem.

It has it's place when used properly in the pre-XL02 versions.
 
K

Kevin Vaughn

Ah. It's copying to another workbook? For some reason, I was under the
impression that it was copying to another worksheet that was the problem.
Thanks. So far I haven't felt like testing it (to the extent of trying to
make Excel crash.)
 
Top