ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Replace formula to text (https://www.excelbanter.com/excel-discussion-misc-queries/178548-replace-formula-text.html)

Art

Replace formula to text
 
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.

Mike H

Replace formula to text
 
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

"art" wrote:

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.


Gary''s Student

Replace formula to text
 
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
--
Gary''s Student - gsnu200771


"art" wrote:

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.


Gord Dibben

Replace formula to text
 
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

On Mon, 3 Mar 2008 07:17:01 -0800, art wrote:

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.



Art

Replace formula to text
 
Thanks to all three of you. That should be fine.
"Gord Dibben" wrote:

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

On Mon, 3 Mar 2008 07:17:01 -0800, art wrote:

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.





All times are GMT +1. The time now is 11:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com