+ Reply to Thread
Results 1 to 3 of 3

Run Macro when indirect cell reference changes

  1. #1
    Registered User
    Join Date
    03-05-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    4

    Run Macro when indirect cell reference changes

    Hi,

    I'm fairly new to Visual Basic, so apologies if this is fairly simple.

    I currently have a macro (named Macro1) that relies on information from two dropdowns to pull out a named range from a big dataset. The linked cells from the two drop downs are referenced by another cell which combines them, and this is used as the reference for the Macro.

    Ex - Drop down 1 is linked to C4 and Drop down 2 is linked to F4. The formula in H4 is = C4 & " " & F4 , and this is the cell which I want the macro to respond to.

    How do I get the macro to run whenever each drop down is changed? Any help would be very much appreciated.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Run Macro when indirect cell reference changes

    Right-Click on both DropDowns and assign Macro1 to each. That will trigger Macro1 when either DropDown is changed.

    Macro1 can still respond to the value in H4 within its' code or it could combine C4 and F4 itself.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    03-05-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Run Macro when indirect cell reference changes

    Thanks very much.

+ 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] Replace absolute cell reference with Indirect cell reference in formula
    By Roothy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-11-2013, 04:46 AM
  2. indirect reference in macro to select different worksheets
    By bengubb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-17-2013, 05:38 PM
  3. Indirect cell reference
    By eddyq in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-03-2013, 02:41 PM
  4. [SOLVED] How to reference an entire row based on an indirect cell reference
    By echo_oscar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-31-2012, 08:50 PM
  5. [SOLVED] Indirect reference to run macro in another workbook?
    By KR in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2006, 01:27 PM

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