ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   "Textualize" another cell's formula (https://www.excelbanter.com/excel-worksheet-functions/107567-textualize-another-cells-formula.html)

Ben

"Textualize" another cell's formula
 
Hi all,

Is there a way to "Textualize" a forumula from another cell usinig standard
Excel built-in text functions? For example

A1 B1 C1 D1
1 2 3 [A1+B1]

cell D1 gets it's value from C1 which contains a formula: [=A1+B1]. But in
D1 the "=" is stripped.

Thanks.

Ben


--


Bernard Liengme

"Textualize" another cell's formula
 
Here is a user-defined function that will do what you want

Function showfn(mycell)
If mycell.HasFormula Then
showfn = Mid(mycell.Formula, 2)
Else
showfn = ""
End If
End Function

Need help using it?
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Ben" wrote in message
...
Hi all,

Is there a way to "Textualize" a forumula from another cell usinig
standard
Excel built-in text functions? For example

A1 B1 C1 D1
1 2 3 [A1+B1]

cell D1 gets it's value from C1 which contains a formula: [=A1+B1]. But
in
D1 the "=" is stripped.

Thanks.

Ben


--




Dave F

"Textualize" another cell's formula
 
You can also put an apostrophe to the left of the formula you're entering if
you want the = sign to remain visible.
--
Brevity is the soul of wit.


"Bernard Liengme" wrote:

Here is a user-defined function that will do what you want

Function showfn(mycell)
If mycell.HasFormula Then
showfn = Mid(mycell.Formula, 2)
Else
showfn = ""
End If
End Function

Need help using it?
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Ben" wrote in message
...
Hi all,

Is there a way to "Textualize" a forumula from another cell usinig
standard
Excel built-in text functions? For example

A1 B1 C1 D1
1 2 3 [A1+B1]

cell D1 gets it's value from C1 which contains a formula: [=A1+B1]. But
in
D1 the "=" is stripped.

Thanks.

Ben


--





Ben

"Textualize" another cell's formula
 
Bernard,

Thanks for below function. Is there a way to do it using just standard
Excel function, ie, entering Excel formula in the formula bar?

Ben
--



"Bernard Liengme" wrote:

Here is a user-defined function that will do what you want

Function showfn(mycell)
If mycell.HasFormula Then
showfn = Mid(mycell.Formula, 2)
Else
showfn = ""
End If
End Function

Need help using it?
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Ben" wrote in message
...
Hi all,

Is there a way to "Textualize" a forumula from another cell usinig
standard
Excel built-in text functions? For example

A1 B1 C1 D1
1 2 3 [A1+B1]

cell D1 gets it's value from C1 which contains a formula: [=A1+B1]. But
in
D1 the "=" is stripped.

Thanks.

Ben


--





RagDyeR

"Textualize" another cell's formula
 
Not really using a "standard" XL function ... but this *is* using an XL
function in a named formula.

******************
First, the CAVEAT:

This should be used in XL02 and later.
Earlier version *WILL* crash when *copying* this formula to other WBs.
Can be used in all versions as long as you don't copy to *Other* WBs ...
copying within a sheet is OK.
***********************

Start by clicking in D1, then,
<Insert <Name <Define
In the "Names In Workbook" box, enter a short name for this formula, say
displ
for "display".
In the "Refers To" box, replace whatever's there with this formula:

=GET.CELL(6,C1)

Then <OK

What you have now is a 'relative' *named formula* that when entered in *any*
cell, will return the contents of the cell (text, data, formulas) from the
*previous* column.

So, if you enter,
=displ
in D1, you'll see the formula from C1 displayed.

=A1+B1

You stated in your OP that you wanted to see the formula without the equal
sign.
If you *really* want to strip the = sign, then use this formula in D1:

=RIGHT(displ,LEN(displ)-1)

You can copy this down as needed, if you wish.
--
HTH,

RD

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


"Ben" wrote in message
...
Bernard,

Thanks for below function. Is there a way to do it using just standard
Excel function, ie, entering Excel formula in the formula bar?

Ben
--



"Bernard Liengme" wrote:

Here is a user-defined function that will do what you want

Function showfn(mycell)
If mycell.HasFormula Then
showfn = Mid(mycell.Formula, 2)
Else
showfn = ""
End If
End Function

Need help using it?
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Ben" wrote in message
...
Hi all,

Is there a way to "Textualize" a forumula from another cell usinig
standard
Excel built-in text functions? For example

A1 B1 C1 D1
1 2 3 [A1+B1]

cell D1 gets it's value from C1 which contains a formula: [=A1+B1].
But
in
D1 the "=" is stripped.

Thanks.

Ben


--







All times are GMT +1. The time now is 02:01 PM.

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