+ Reply to Thread
Results 1 to 7 of 7

Auto-Populate Data From Master List to Separate Sheets When Two Criteria's Are Met

  1. #1
    Registered User
    Join Date
    03-03-2014
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    4

    Auto-Populate Data From Master List to Separate Sheets When Two Criteria's Are Met

    Hi!

    I started creating a database with clients registered for a program. There are three sessions. I wanted to see if there is a way to use macro to auto-populate data from a Master List holding all data onto three separate sheets(Session 1, Session 2, Session 3). From the master list when Column A (Status) says complete and Column J (session) says 1, I would like the information that corresponds with that row to be automatically updated into a separate sheet titled Session 1 and the same if the session chosen is 2 or 3.

    I attached a mock database document. One saved in workbook, the other macro-enabled.

    Thank you so much for taking the time to assist with this.

    Greatly Appreciated.

    C.

    2014 Mock Database.xlsm2014 Mock Database (Workbook).xlsx

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,837

    Re: Auto-Populate Data From Master List to Separate Sheets When Two Criteria's Are Met

    Copy and paste this macro into the worksheet code module. Do the following: right click the tab for your sheet "Master List" and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. The macro is triggered by a change in any cell in column A. This means that you must enter the data in all the other columns first and choose "Complete" last in column A.
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    03-03-2014
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Auto-Populate Data From Master List to Separate Sheets When Two Criteria's Are Met

    Hi Mumps1,

    Thanks for taking the time to help.

    After I copy and paste the code,I picked 'complete' from the drop down list in Column A on the master list and the view code page came up saying "Compile Error: Syntax Error." I clicked ok and part ** the code was highlight in red, the line before ' End If':

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
    Dim LastRow As Long
    If Target = "Complete" Then
    LastRow = Sheets("Session" & " " & Cells(Target.Row, "J")).Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    Target.EntireRow.Copy Sheets("Session" & " " & Cells(Target.Row, "J")).Cells(LastRow + 1, "A").End(xlUp).**fset(1, 0)
    End If
    End Sub

    I'm not sure what I did wrong. I attached the file with the code inserted and the cells filled.

    Thanks Again!
    C.

    2014 Mock Database.xlsm
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-03-2014
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Auto-Populate Data From Master List to Separate Sheets When Two Criteria's Are Met

    Greatly Appreciate it
    Last edited by centibttrfly; 03-08-2014 at 06:49 PM.

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,837

    Re: Auto-Populate Data From Master List to Separate Sheets When Two Criteria's Are Met

    Replace the problem line with this line:
    Please Login or Register  to view this content.
    I'm not sure where the asterisks came from. It was probably a typo. Make sure the macro is placed in the worksheet code module.

  6. #6
    Registered User
    Join Date
    03-03-2014
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Auto-Populate Data From Master List to Separate Sheets When Two Criteria's Are Met

    Thank you, Thank you, Thank you. It worked!

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,837

    Re: Auto-Populate Data From Master List to Separate Sheets When Two Criteria's Are Met

    My pleasure.

+ 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. Auto-populate data to a master worksheet from other sheets in a shared workbook
    By JennyJAL in forum Excel Programming / VBA / Macros
    Replies: 45
    Last Post: 08-20-2021, 12:08 AM
  2. [SOLVED] Need to populate master list from data on multiple sheets
    By lulu319 in forum Excel Charting & Pivots
    Replies: 11
    Last Post: 05-22-2013, 12:20 PM
  3. Auto-populate to Master list from Multiple sub sheets
    By 614984 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-18-2012, 04:18 PM
  4. Auto Populate Master Sheet with multiple sheets data
    By haley in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-26-2009, 04:29 AM
  5. how to auto populate data from multiple sheets to a master
    By Fosachy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-21-2009, 06:15 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