Results 1 to 2 of 2

Thread: Run a macro when certain cells change

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2006
    Posts
    6

    Question Run a macro when certain cells change

    Basically i have tables A to H each of these table pulls data from a different series of cells, and then needs to be sorted with highest first etc.

    The code to do the sort is complete, the problem is i have to assign it to an on screen button which is untidy. What i want to do is if any of the reference cells are changed then sort then tables.

    I have tried various method but none quite work.
    The closest was changing cells to trigger the code but that made the sheet flicker every time the current cell changed (eg moving from A1 to C4).

    I did wonder if there was a special sub for on calculation like there is one for auto_open()

  2. #2
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Re: Run a macro when certain cells change

    You need to call your code from the Worksheet_Change event, checking to see if the Target range intersects with your reference cells.

    Search this forum for Worksheet_Change and you will find lots of examples of how to do this.
    Declan

    Don't forget to mark your Thread as resolved.
    Take a moment to rate posts that you think are helpful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width