+ Reply to Thread
Results 1 to 7 of 7

Macro auto updates when a cell changes

  1. #1
    Registered User
    Join Date
    05-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    43

    Macro auto updates when a cell changes

    I am having trouble trying to update certain columns with an already existing macro. I want a few columns to be updated based on several macros in place.

    This is what I have so far:

    Private Sub Worksheet_Changes(ByVal Target As Range)
    If Target.Address = Range("B" & Rows.Count).End(xlUp).row Then
    Call concatdeal
    If Target.Address = Range("E" & Rows.Count).End(xlUp).row Then
    Call concatdeal
    If Target.Address = Range("A" & Rows.Count).End(xlUp).row Then
    Call rplENTSPORTSYAKIDSNEWS
    End If
    End Sub

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Macro auto updates when a cell changes

    Please Login or Register  to view this content.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Registered User
    Join Date
    05-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: Macro auto updates when a cell changes

    Thank you! It doesn't seem to work. Let me know if I am doing something wrong. The 'Call' is equal to the Module ID correct? Want to make sure I gave you the right macro ID you need.

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Macro auto updates when a cell changes

    No, the Call is the name of the Sub.

    Also, if the Sub is Private it only exists at it's module level. Instead, declare it as Public.

    Inside of a Module I'm calling UNICORNS_AND_MACROS I have the following code:

    Please Login or Register  to view this content.

    Then in my worksheet, I have a change Event

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: Macro auto updates when a cell changes

    Thank you! Do you have any experience making a macro for multiple columns to equal other multiple columns (some would include calculations)?

    Below is what I have so far:

    Range("AG").Formula = "A"
    Range("AH").Formula = "C"
    Range("AI").Formula = "D"
    Range("AJ").Formula = "B"
    Range("AY").Formula = "E"
    Range("AZ").Formula = "F"
    Range("G").Formula = "F" - "E"
    Range("H").Formula = If("AT"<0,"AT","")

  6. #6
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Macro auto updates when a cell changes

    I've written only a few hundred procedures, mostly I'm a tinkerer. Would you be running this for multiple rows as well?

    For example let's apply some changes to all the columns from row 5 to row 10:

    Please Login or Register  to view this content.
    This would run through 5 to 10, substituting i for a number each time.

  7. #7
    Registered User
    Join Date
    05-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: Macro auto updates when a cell changes

    Yeah and the range starts at row 8 for example. formula ends when the data ends

+ 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 that updates formula (uses next cell each time it is run)
    By carrus in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-23-2013, 11:07 PM
  2. Unintended cell reference updates when running macro
    By NickBach in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-27-2011, 07:35 AM
  3. automatically run macro when cell updates
    By easty in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 08-24-2010, 09:55 AM
  4. Autorun Macro when formula in cell updates
    By ColinNicol17 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-21-2009, 06:21 PM
  5. Macro to insert Now() when cell updates
    By systematic in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-27-2005, 02:50 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