+ Reply to Thread
Results 1 to 4 of 4

Getting a macro/sub function to run automatically when values change

  1. #1
    Registered User
    Join Date
    05-28-2019
    Location
    Edinburgh
    MS-Off Ver
    2013
    Posts
    92

    Getting a macro/sub function to run automatically when values change

    Hi Guys,
    Is it possible to get a code to run automatically if any of the value change. I have attached a copy of a code I have. So for instance if I run the code the table will fill itself in. However I want to know if I change any of the values in B2:B4 is it possible for the table to automatically update?
    Attached Files Attached Files

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,260

    Re: Getting a macro/sub function to run automatically when values change

    Right-click the sheet tab, choose View Code and paste this in:

    Please Login or Register  to view this content.
    Note that you have a superfluous End If in the Mass_percent routine so it won't currently work. Remove the one before the End Sub.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: Getting a macro/sub function to run automatically when values change

    Into Sheet1 code (not tested):

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  4. #4
    Registered User
    Join Date
    05-28-2019
    Location
    Edinburgh
    MS-Off Ver
    2013
    Posts
    92

    Re: Getting a macro/sub function to run automatically when values change

    Thanks guys, both codes work perfectly

+ 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. automatically change values in excel 2007
    By mandura in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2016, 09:54 AM
  2. [SOLVED] TO Automatically Change the Sum range without Editing the Function
    By Did13n in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-21-2015, 05:03 AM
  3. Replies: 8
    Last Post: 07-05-2015, 03:21 PM
  4. Replies: 9
    Last Post: 10-31-2011, 03:56 PM
  5. Change values automatically
    By Kribulin in forum Excel General
    Replies: 2
    Last Post: 06-04-2008, 03:06 AM
  6. [SOLVED] All values automatically change to zero
    By Ricky in forum Excel General
    Replies: 1
    Last Post: 07-05-2005, 12:05 PM
  7. [SOLVED] How di get excel to automatically change cell values
    By talil in forum Excel General
    Replies: 1
    Last Post: 03-16-2005, 05:06 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