+ Reply to Thread
Results 1 to 5 of 5

Excel4 Macro Referring to cells in Formula - Refer to any cell

  1. #1
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Excel4 Macro Referring to cells in Formula - Refer to any cell

    With Named Range "MyFormula" refers to:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    AND..... type this into any cell (without brackets) to return the formula text of the adjacent cell on the left
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Is it possible to adapt this to make it more universal so that I do not have to be in same position relative to a target cell each time?
    (somehow need required cell reference in the formula )
    - workbook attached

    Thanks for reading
    Kev

    NOTES:
    1. This is to solve another thread.

    2. Options rejected:

    UDF option: (OP does not want VBA)
    Please Login or Register  to view this content.
    with this in cell:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula Option: (not available - OP using Excel 2003)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by kev_; 11-24-2017 at 01:53 AM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Excel4 Macro Referring to cells in Formula - Refer to any cell

    Halfway house... use this as the NR

    =GET.CELL(6,Sheet1!$A2)

    your "myformula" formula can then start in any column, row 2...
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Excel4 Macro Referring to cells in Formula - Refer to any cell

    Hi,

    The only close way I can think of would be to use a cell that is in a fixed relative position to your MyFormula cell(s) to supply the address of the cell whose formula you wish to retrieve.
    Attached Files Attached Files
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  4. #4
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Excel4 Macro Referring to cells in Formula - Refer to any cell

    Thanks Glenn
    - that's better than I managed
    - that method would allow either a column or a row to have the same formula

  5. #5
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Excel4 Macro Referring to cells in Formula - Refer to any cell

    @xlnitwit - that looks promising. I will play around with that idea later
    thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 09-29-2017, 04:36 AM
  2. Refer to row formula is referring to for lookup
    By just_some_dude in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-09-2011, 03:50 PM
  3. referring to cells in the same row of a formula
    By drossen in forum Excel General
    Replies: 1
    Last Post: 04-07-2010, 05:29 PM
  4. Referring to a cell with a Macro
    By LonestarMike in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-13-2010, 05:54 PM
  5. How To Dynamically Refer To A Cell In A Macro Formula
    By ChrisF79 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-17-2009, 11:47 AM
  6. macro referring to a cell that contains a formula
    By tweety127 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2008, 09:07 PM
  7. [SOLVED] refer to a cells value in a macro
    By loulou in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-24-2005, 10:06 AM

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