+ Reply to Thread
Results 1 to 3 of 3

How to show the formula of another cell

  1. #1
    Bol
    Guest

    How to show the formula of another cell

    Hi

    I want to show the content (formula) of another cell. For instance, if the
    formula in A1 is =2*12, I want cell B1 to show =2*12 instead of the answer
    (24). In other words i want the answer as usual (24) in A1, and in B1 I want
    the formula of A1 to be showed (=12*2).

    I am not interested in showing all of the formulas in the sheet, like you
    can do with tools/options/view/formulas.

    Please help!

  2. #2
    Arvi Laanemets
    Guest

    Re: How to show the formula of another cell

    Hi

    You can use this UDF:

    Public Function ShowFormula(MyCell As Range)
    ShowFormula = MyCell.Formula
    End Function

    Copy the function into workbook module. After that, you can use it in this
    workbook as any other formula. P.e. into B1 enter
    =ShowFormula(A1)


    --
    Arvi Laanemets
    ( My real mail address: arvi.laanemets<at>tarkon.ee )


    "Bol" <Bol@discussions.microsoft.com> wrote in message
    news:CF36B054-B7F5-42CE-8CFB-4425670B5865@microsoft.com...
    > Hi
    >
    > I want to show the content (formula) of another cell. For instance, if the
    > formula in A1 is =2*12, I want cell B1 to show =2*12 instead of the answer
    > (24). In other words i want the answer as usual (24) in A1, and in B1 I
    > want
    > the formula of A1 to be showed (=12*2).
    >
    > I am not interested in showing all of the formulas in the sheet, like you
    > can do with tools/options/view/formulas.
    >
    > Please help!




  3. #3
    Bol
    Guest

    Re: How to show the formula of another cell

    Thanks, that solved the problem. By the way, is it not possible to do this
    without a UDF?



    > Hi
    >
    > You can use this UDF:
    >
    > Public Function ShowFormula(MyCell As Range)
    > ShowFormula = MyCell.Formula
    > End Function
    >
    > Copy the function into workbook module. After that, you can use it in this
    > workbook as any other formula. P.e. into B1 enter
    > =ShowFormula(A1)
    >
    >
    > --
    > Arvi Laanemets
    > ( My real mail address: arvi.laanemets<at>tarkon.ee )
    >



+ 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