+ Reply to Thread
Results 1 to 5 of 5

Display Formula in adjacent cell

  1. #1
    Registered User
    Join Date
    03-19-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    5

    Display Formula in adjacent cell

    G'day Everyone,

    I need a little help. I want to display the formula in the adjacent box to where it is actually used. Would anyone happen to know how to get that done?

    Example:

    If cell A1 contains the following formula: A1+ A2
    I want cell A2 to show : '= A1+A2'

    Thank you in advance for your help. I appreciate it.
    Last edited by troy69; 03-19-2009 at 08:56 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Display Formula in adjacent cell

    You would probably need a UDF, something like:

    Please Login or Register  to view this content.
    B1: =GETFORMULA(A1)

  3. #3
    Registered User
    Join Date
    03-19-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Display Formula in adjacent cell

    Donkeyote,

    Thanks for the code but Excel returns an error when I try and use it. It says unrecognized name. Any ideas whats going on ?? Once again, thank you for your help. I appreciate it.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Display Formula in adjacent cell

    The Function must reside in a Module as opposed to a Sheet / Workbook Object. You will of course need to ensure you save your file as .xlsm type (or .xls) and when re-opening ensure Macros are enabled ... for more info on 2007 macro security see: http://office.microsoft.com/en-us/ex...969191033.aspx

  5. #5
    Registered User
    Join Date
    03-19-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Display Formula in adjacent cell

    Donkeyote,

    Figured out what was going wrong. I really appreciate your effort. Thank you

+ 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