+ Reply to Thread
Results 1 to 8 of 8

Run macro if dynamic range changes

  1. #1
    Forum Contributor
    Join Date
    08-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    404

    Run macro if dynamic range changes

    Hi all,

    I'm having an issue with this one.

    I have uploaded an example workbook.
    I need a code which fires some other code
    Please Login or Register  to view this content.
    whenever a range of cells change which are within 5 days of todays date. Hence, the msgbox would fire if anything in yellow was changed (B16:D21) and then tomorrow the range would be slightly different (B17:D22), etc

    Todays date will always be in A1.
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,606

    Re: Run macro if dynamic range changes

    For your sheet code:
    Please Login or Register  to view this content.
    note in attachment there is now out-or range date in A1
    Attached Files Attached Files
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    08-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    404

    Re: Run macro if dynamic range changes

    Hi Kaper,

    Thanks. I downloaded your file and changed all the cells in yellow. No MsgBox appeared?

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,606

    Re: Run macro if dynamic range changes

    let me repeat (may be it was in small print :-)
    note in attachment there is now out-or range date in A1 - i left it after tests what happens if there is no match so change A1 again to TODAY, enable macros, and it shall work.

  5. #5
    Forum Contributor
    Join Date
    08-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    404

    Re: Run macro if dynamic range changes

    Great! Thanks Kaper.

    Sorry for the late reply. My bad.

  6. #6
    Forum Contributor
    Join Date
    08-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    404

    Re: Run macro if dynamic range changes

    Hi Kaper,

    Sorry - not sure if I should start a new thread or not? - but how do I adjust your code so that it identifies the actual cell that has been changed in the MsgBox?

  7. #7
    Forum Contributor
    Join Date
    08-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    404

    Re: Run macro if dynamic range changes

    It's ok I've sorted it - I just removed this if anyone else wants to know...

    Please Login or Register  to view this content.

  8. #8
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,606

    Re: Run macro if dynamic range changes

    Glad you did it. I was off-line few last days. But you did right.

+ 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] Macro - Dynamic Copy Range
    By Lacaycer in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 09-28-2012, 03:23 PM
  2. Macro to do Calculations on a dynamic Range
    By psrs0810 in forum Excel General
    Replies: 5
    Last Post: 11-18-2010, 02:56 AM
  3. Dynamic Range for macro
    By soakaos in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-11-2010, 05:20 PM
  4. Sum A Dynamic Range Affected By Macro
    By goldenbear10 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-01-2009, 04:51 AM
  5. Selecting dynamic range within macro.
    By NickMinUK in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-03-2009, 06:25 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