+ Reply to Thread
Results 1 to 7 of 7

Automatically populate data to multiple sheets

  1. #1
    Registered User
    Join Date
    12-28-2012
    Location
    CA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Automatically populate data to multiple sheets

    Hi,

    I have a spreadsheet that contains many lines of information that will constantly be added to and updated. One of the columns contains a drop down with 4 possible options. I am trying to get the data to copy to a sheet based on 1 of the 4 options selected. So for example, if Education is selected, then that row of data should also appear in the Education sheet. Same goes if one of the other options is selected.

    I have seen several examples on this forum, but they are mostly macros (or formulas that don't quite apply). I am trying to use formulas so that the information is updated live so macros don't really seem to be a viable option.

    I am including a sample of the spreadsheet with data on the main sheet and how I want it to look when it is transferred over to the other sheets. I had to substitute a lot of the information (with numbers or filler words) due to it being confidential, but this should give a good enough idea of what I am trying to do. Please let me know if you have any additional questions.

    Thanks in advance!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Automatically populate data to multiple sheets

    By adding in some helper columns and rows, the attached should work
    I only added the formula for the entertainment tab. The rest will work exactly the same way.
    Attached Files Attached Files
    Please click the * icon below if I have helped.

  3. #3
    Registered User
    Join Date
    12-28-2012
    Location
    CA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Automatically populate data to multiple sheets

    Quote Originally Posted by Melvinrobb View Post
    By adding in some helper columns and rows, the attached should work
    I only added the formula for the entertainment tab. The rest will work exactly the same way.
    Awesome, I only briefly looked at it, but that looks perfect.

    Thanks Melvinrobb! Happy New Year

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Automatically populate data to multiple sheets

    Hi dfulmer,

    Here's an event procedure for your "All Content" sheet:

    Please Login or Register  to view this content.

    Directions for running the routine(s) just supplied

    Copy the code to the clipboard

    Press ALT + F11 to open the Visual Basic Editor.

    Select “Module” or “Sheet” as directed above from the Insert menu

    Type "Option Explicit" then paste the code into the white space on the right

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name
    Last edited by xladept; 01-01-2013 at 04:34 PM.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

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

    Re: Automatically populate data to multiple sheets

    How to use the macro:

    1. Open up your workbook
    2. Right-click the sheet tab and select View Code
    3. The sheet module should appear onscreen when the VBA editor opens
    4. Copy and Paste in your code (given above)
    5. Get out of VBA (Press Alt+Q)
    6. Save your sheet

    The macro is installed and ready to use. Press Alt-F8 and select it from the macro list.
    _________________
    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!)

  6. #6
    Registered User
    Join Date
    12-28-2012
    Location
    CA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Automatically populate data to multiple sheets

    Quote Originally Posted by Melvinrobb View Post
    By adding in some helper columns and rows, the attached should work
    I only added the formula for the entertainment tab. The rest will work exactly the same way.
    I was able to look at this further and it looks like it will work perfectly. Thanks again Melvinrobb

    Quote Originally Posted by xladept View Post
    Hi dfulmer,

    Here's an event procedure for your "All Content" sheet:

    Please Login or Register  to view this content.

    Directions for running the routine(s) just supplied

    Copy the code to the clipboard

    Press ALT + F11 to open the Visual Basic Editor.

    Select “Module” or “Sheet” as directed above from the Insert menu

    Type "Option Explicit" then paste the code into the white space on the right

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name
    Although the formula solution above works fine, I am kind of curious to check this method out but it isnt working for me. I add the code to the sheet page and then close the window. When I hit Alt-F8, there is nothing for me to run in that list, but if I change one of the drop downs I get a Run-time error '1004' - Method 'Range' of object '_Worksheet' failed. Any ideas what I'm doing wrong?

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Automatically populate data to multiple sheets

    Hi dfullmer,

    You didn't do anything wrong - here's my copy:PopData.xlsm

    To test an event procedure it takes a different technique - I'll correct my instructions for events and I apologize - but see the sheet code to see how to test with F8 single step.

    Hope you like it!

+ 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