+ Reply to Thread
Results 1 to 4 of 4

Need more address to be able to trigged from - see code below

  1. #1
    Registered User
    Join Date
    05-06-2013
    Location
    Spring Hill, FL
    MS-Off Ver
    Excel 2010
    Posts
    2

    Need more address to be able to trigged from - see code below

    I think I found this code on the forum but have a question.
    In the code below I would like to know how to have more than one target address to trigger other marcos.
    I have approx. 110 more addresses that I would like to trigger from each with their own set of macros to run if possible.
    BTW they are not all in column G. Thanks for your help in advance.



    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address <> "$G$21" Then Exit Sub
    If Target <> "" Then
    Select Case Target.Value
    Case "-"
    Call Macro2

    Case "&", "D", "R", "+"
    Call Macro3
    End Select
    End If

    End Sub

  2. #2
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Need more address to be able to trigged from - see code below

    Without you sharing the workbook with the addresses, I would suggest that you have to create a named range that has these addresses in it, then use intersect in your code to check if the target that changed is part of your named range. There are probably other ways to do it, but without seeing the workbook, or knowing the addresses, it's hard to tell you how to do it.
    Click the * Add Reputation button in the lower left hand corner of this post to say thanks.

    Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.

  3. #3
    Registered User
    Join Date
    05-06-2013
    Location
    Spring Hill, FL
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Need more address to be able to trigged from - see code below

    I have attached the sheet and macros that I have been working on. I am sure that their is a better way to do what I am trying to do I just don't know how to do it.

    I am trying to run the macros for every room so that as I change the data in cell G21, for example, it will change the other cells in columns G & H that need to be changed. If I change the data in cell I21 it will change the data in cells in columns I & J as needed.
    Attached Files Attached Files
    Last edited by cagney1; 11-02-2015 at 10:56 AM.

  4. #4
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Need more address to be able to trigged from - see code below

    I am trying to run the macros for every room so that as I change the data in cell G21, for example, it will change the other cells in columns G & H that need to be changed. If I change the data in cell I21 it will change the data in cells in columns I & J as needed.
    Are you going to give details as to what should happen?

+ 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. Code to search for address via Name
    By lazyengineer in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-09-2015, 02:37 PM
  2. How to get a Zip Code from an address
    By Drgre in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-20-2015, 07:17 AM
  3. Need VBA to look up for ZIP code in address column.
    By winmaxservices1 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2015, 02:29 PM
  4. [SOLVED] Separate Zip Code from Address
    By geddes_3 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 12-13-2013, 07:39 PM
  5. Replies: 1
    Last Post: 03-08-2012, 01:57 PM
  6. Extracting Zip Code from Address String
    By lizzae in forum Excel General
    Replies: 1
    Last Post: 05-13-2009, 10:37 AM
  7. How do I put the zip code in the address label?
    By xsell in forum Excel General
    Replies: 1
    Last Post: 12-01-2005, 11:35 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