+ Reply to Thread
Results 1 to 6 of 6

Dynamically addressing a cell in Range.Formula

  1. #1
    Registered User
    Join Date
    01-07-2021
    Location
    Frankfurt, Germany
    MS-Off Ver
    M365
    Posts
    3

    Question Dynamically addressing a cell in Range.Formula

    I've been trying to write a dynamic address into a cell as input to a formula. Unfortunately usage of a concatenated string (variable ftext) returns

    =IF(ISBLANK(F8);Master!'A2';0) instead of =IF(ISBLANK(F8);Master!A2;0)

    i. e. it's not interpreted as a cell reference (resulting in #NAME? instead of the value in Master!A2). Would appreciate any thoughts that might help.

    Code excerpt
    ...
    Please Login or Register  to view this content.
    ...
    Last edited by alansidman; 01-07-2021 at 07:14 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,863

    Re: Dynamically addressing a cell in Range.Formula

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    01-07-2021
    Location
    Frankfurt, Germany
    MS-Off Ver
    M365
    Posts
    3

    Re: Dynamically addressing a cell in Range.Formula

    Apologies...and thanks for starting me off :-).

    One more note just fyi: FormulaR1C1 produces the same result...

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Dynamically addressing a cell in Range.Formula

    How about
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-07-2021
    Location
    Frankfurt, Germany
    MS-Off Ver
    M365
    Posts
    3

    Thumbs up Re: Dynamically addressing a cell in Range.Formula

    Appreciated! Did solve it.
    Need to fix the row counter now but shouldn't be an issue. Many thanks. Any explanation for this (in my opinion) strange behavior?

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Dynamically addressing a cell in Range.Formula

    It's because you were probably mixing A1 & R1C1 notation.

+ 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. [SOLVED] Adding checkboxes to non contiguous ranges - addressing the range
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-26-2018, 10:53 AM
  2. Dynamically change formula range
    By 119luke in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-29-2018, 01:44 PM
  3. Use a formula to dynamically populate the row value of a range.
    By thejrose in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-23-2017, 12:04 PM
  4. Replies: 3
    Last Post: 06-28-2016, 04:24 AM
  5. Subscript out of range when addressing worksheet
    By DougieL in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-28-2013, 09:13 AM
  6. Replies: 1
    Last Post: 01-09-2006, 05:15 PM
  7. how do i maintain named range addressing after deleting row?
    By erp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-30-2005, 09:55 PM

Tags for this Thread

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