+ Reply to Thread
Results 1 to 3 of 3

Linking data to multiple sheets

  1. #1
    Registered User
    Join Date
    04-22-2010
    Location
    Indiana, USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Exclamation Linking data to multiple sheets

    I’m working on a company phone list. I would like to have a master list that has all employee names on it. One column in the master list will be called “LOC” for the location where the employee works.

    If I assign a value to each location, is there some sort of coding or formula that can copy entire rows of data that have a match with the location value to another sheet?
    APG is 1
    WASH is 2
    WEST is 3
    BLUFF is 4
    INFAN is 5

    Ie:
    Master list has a complete list of all employee names.
    Sheet 2 is called APG which has a value of 1.
    Sheet 2 will then have a full list of all the employees from the master sheet that work at the APG location.

    And all changes to the master sheet will update in the following division location sheets.

    Please help!!

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Linking data to multiple sheets

    Please see the attached. It uses an event driven macro to refresh the individual sheets based on the master sheet every time they are activated.

    You can see the code by hitting Alt F11 and selecting the ThisWorkbook tab in the project explorer pane.
    Attached Files Attached Files
    Martin

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Linking data to multiple sheets

    Martin, dklatt, by adding the two lines shown, the macro becomes virtually instantaneous.
    Please Login or Register  to view this content.

    Using your activation technique, you should probably have a BeforePrint, BeforeSave and a BeforeClose event that updates all the worksheets by simply running through and activating them all.

    Please Login or Register  to view this content.

    Lastly, since each time the macro runs we are actually evaluating the entire dataset for a single value throughout a single column, you can do that without looping using the autofilter in one copy command, yes?
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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