+ Reply to Thread
Results 1 to 4 of 4

Move formula reference one cell down

  1. #1
    Registered User
    Join Date
    02-11-2019
    Location
    Chicago, IL
    MS-Off Ver
    2016
    Posts
    8

    Move formula reference one cell down

    I have a cell, B2, which refers to another sheet in my file. The formula reference to the other sheet is "=ESPN!S6". Based on the value returned to B2, it generates a URL which forms the basis of a macro. I would like to write a macro which moves the referenced cell of B2 down by one cell to "=ESPN!S7" so that the value of B2 -> the URL -> the macro all update accordingly. Ultimately I want to shift the referenced cell down one cell at a time a few hundred times until I get to the bottom of the list in column S of the ESPN sheet.

    Is there a simple way to automate this in VBA?

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Move formula reference one cell down

    You show your formula as "=ESPN!S6"
    Does it actually contain "" or are you just showing that?
    If it does, try removing so you can copy down...
    =ESPN!S6
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    02-11-2019
    Location
    Chicago, IL
    MS-Off Ver
    2016
    Posts
    8
    Quote Originally Posted by FDibbins View Post
    You show your formula as "=ESPN!S6"
    Does it actually contain "" or are you just showing that?
    If it does, try removing so you can copy down...
    =ESPN!S6
    It is not in quotes - please excuse the poor formatting. I do not want to copy it down because 1) I want to keep the formula in B2 and 2) I want to do this through a macro.

    Edit: I am thinking that I can use the indirect function instead of directly referencing ESPN!S6. I could use a macro to increment the 6 to a 7 the. Have the indirect function reference the cell holding the 6 or 7... I just signed off for the night but will report back tomorrow.
    Last edited by mrdomer07; 02-17-2019 at 02:48 AM.

  4. #4
    Registered User
    Join Date
    02-11-2019
    Location
    Chicago, IL
    MS-Off Ver
    2016
    Posts
    8

    Re: Move formula reference one cell down

    I ended up using the indirect function which worked much better.

+ 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. Macro button to move formula cell reference to the next column - HELP!
    By Alice21 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2013, 12:04 PM
  2. Move a cell reference from one column to another
    By johnny_the_Red in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-14-2011, 06:19 PM
  3. Copy/move cell format & comment in cell reference
    By mkseto in forum Excel General
    Replies: 3
    Last Post: 02-02-2009, 03:00 AM
  4. move tab to new workbook without reference in formula
    By drocket in forum Excel General
    Replies: 8
    Last Post: 01-15-2007, 10:54 AM
  5. [SOLVED] how do I format a cell reference to move as source changes
    By Vasant Nanavati in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 PM
  6. [SOLVED] how do I format a cell reference to move as source changes
    By KGray in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2005, 04:05 PM
  7. how do I format a cell reference to move as source changes
    By Vasant Nanavati in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 07:05 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