Replace formula to text

A

art

Hello:

I would like to replace a formula to the actual text of the formula. Fo E.G.
if I have in a cell "=A1", and I want to copy the formula to cell A25, it
will copy it like this, "=A25", but I want it to copy exactly like the
formula, "=A1". So how can I replace the formula in a cell to the actual text
of the formula without using a formula. Hope I'm explaining myself well, If
not ask please I'll explaine myself more. I need help on this. Thanks.
 
M

Mike H

I'm not completely sure I've understood but you could try this

=$A$1

This will remain as A1 no matter where you drag or copy it to.

Mike
 
G

Gary''s Student

Try this tiny UDF:

Function equation(r As Range) As String
equation = "'" & r.Formula
End Function


So if A1 contains

=1+2+3+4

it will display 10

If you enter =equation(A1) in another cell is will display
'=1+2+3+4
 
G

Gord Dibben

Why do you want =A1 to be text?

I am guessing you want to copy the formula but not have it increment.

Change it to an Absolute formula

=$A$1 in E1 copied to L1 would be =$A$1


Gord Dibben MS Excel MVP
 
A

art

Thanks to all three of you. That should be fine.
Gord Dibben said:
Why do you want =A1 to be text?

I am guessing you want to copy the formula but not have it increment.

Change it to an Absolute formula

=$A$1 in E1 copied to L1 would be =$A$1


Gord Dibben MS Excel MVP
 

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