+ Reply to Thread
Results 1 to 3 of 3

Returning a cell's formula in a different cell

  1. #1
    T.R. Young
    Guest

    Returning a cell's formula in a different cell

    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.
    --
    "I''m just a simple man trying to make my way in the universe..."

  2. #2
    Gary L Brown
    Guest

    RE: Returning a cell's formula in a different cell

    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
    gary_brown@ge_NOSPAM.com
    If this post was helpful, please click the ''Yes'' button next to ''Was this
    Post Helpfull to you?''.


    "T.R. Young" wrote:

    > 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.
    > --
    > "I''m just a simple man trying to make my way in the universe..."


  3. #3
    T.R. Young
    Guest

    RE: Returning a cell's formula in a different cell

    That did it. Thank you very much!
    --
    "I''m just a simple man trying to make my way in the universe..."


    "Gary L Brown" wrote:

    > 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
    > gary_brown@ge_NOSPAM.com
    > If this post was helpful, please click the ''Yes'' button next to ''Was this
    > Post Helpfull to you?''.
    >
    >
    > "T.R. Young" wrote:
    >
    > > 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.
    > > --
    > > "I''m just a simple man trying to make my way in the universe..."


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1