close

Is it possible to have any given cell return another cell's formula? I have
a column in a certain spreadsheet that I use for debugging purposes where I
copy the formula from a cell in the same row and paste it into the cell in
that column with an apostrophe at the beginning so that I can actually see
the formula. Trouble is, if I ever add a row above, the formula that I
copied and pasted is now incorrect. I want to be able to format the cells in
my 'debugging' column so that they will return the formula of the target cell
without actually performing the formula.

I hope that wasn't too confusing...

Thanks in advance for any help.
--
quot;I''m just a simple man trying to make my way in the universe...quot;

My best suggestion is to but the following User-Defined-Function in your
Personal.xls.

'/==================================/
Public Function FormulaView(Select_Cell As Range) As String

FormulaView = Select_Cell.Formula

End Function
'/==================================/

Then you can use the function as...

=FormulaView(C5)

and the cell will show the formula that is in C5.

HTH,
--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.quot;T.R. Youngquot; wrote:

gt; Is it possible to have any given cell return another cell's formula? I have
gt; a column in a certain spreadsheet that I use for debugging purposes where I
gt; copy the formula from a cell in the same row and paste it into the cell in
gt; that column with an apostrophe at the beginning so that I can actually see
gt; the formula. Trouble is, if I ever add a row above, the formula that I
gt; copied and pasted is now incorrect. I want to be able to format the cells in
gt; my 'debugging' column so that they will return the formula of the target cell
gt; without actually performing the formula.
gt;
gt; I hope that wasn't too confusing...
gt;
gt; Thanks in advance for any help.
gt; --
gt; quot;I''m just a simple man trying to make my way in the universe...quot;

That did it. Thank you very much!
--
quot;I''m just a simple man trying to make my way in the universe...quot;quot;Gary L Brownquot; wrote:

gt; My best suggestion is to but the following User-Defined-Function in your
gt; Personal.xls.
gt;
gt; '/==================================/
gt; Public Function FormulaView(Select_Cell As Range) As String
gt;
gt; FormulaView = Select_Cell.Formula
gt;
gt; End Function
gt; '/==================================/
gt;
gt; Then you can use the function as...
gt;
gt; =FormulaView(C5)
gt;
gt; and the cell will show the formula that is in C5.
gt;
gt; HTH,
gt; --
gt; Gary Brown
gt;
gt; If this post was helpful, please click the ''Yes'' button next to ''Was this
gt; Post Helpfull to you?''.
gt;
gt;
gt; quot;T.R. Youngquot; wrote:
gt;
gt; gt; Is it possible to have any given cell return another cell's formula? I have
gt; gt; a column in a certain spreadsheet that I use for debugging purposes where I
gt; gt; copy the formula from a cell in the same row and paste it into the cell in
gt; gt; that column with an apostrophe at the beginning so that I can actually see
gt; gt; the formula. Trouble is, if I ever add a row above, the formula that I
gt; gt; copied and pasted is now incorrect. I want to be able to format the cells in
gt; gt; my 'debugging' column so that they will return the formula of the target cell
gt; gt; without actually performing the formula.
gt; gt;
gt; gt; I hope that wasn't too confusing...
gt; gt;
gt; gt; Thanks in advance for any help.
gt; gt; --
gt; gt; quot;I''m just a simple man trying to make my way in the universe...quot;

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()