Closed Thread
Results 1 to 8 of 8

Auto-Populate a Sheet Based on Criteria in Another Sheet

  1. #1
    Registered User
    Join Date
    08-03-2011
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2003
    Posts
    6

    Auto-Populate a Sheet Based on Criteria in Another Sheet

    Hi all,

    I have to keep track of people who have over 80% attendance to meetings so that they can qualify for awards.

    I have one sheet that has a list of every person (hundreds of them) along with a bunch of data about them (e.g. address, office location, the frequency of their attendance and the percentage of meetings that they have attended etc.).

    I want to have a SEPARATE sheet that auto-populates its rows with the name and other data related to each person OVER 80%. If at some point they fall below 80%, I need them to be automatically removed (and vice-versa).

    Is this something for VBA? What is the best way to approach this problem?

    Any help would be very appreciated.

  2. #2
    Registered User
    Join Date
    07-27-2011
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Auto-Populate a Sheet Based on Criteria in Another Sheet

    If you could post your spreadsheet, even with the data removed so you wouldn't be posting information, we could probably build the code for you.

    This sounds like something that would be best done using VBA.

  3. #3
    Registered User
    Join Date
    08-03-2011
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Auto-Populate a Sheet Based on Criteria in Another Sheet

    Here's a very simple example, since I can't send the real file.
    Basically, I want the 2nd sheet to automatically COPY all the rows from the first sheet that meet the 80% criteria. Basically it should look identical to if I filtered the first sheet on the percentage column.
    I need them to stay in sync, so that if somebody rises above, or dips below the 80% threshold, they either appear, or disappear off of sheet2.
    Attached Files Attached Files
    Last edited by Sirrip; 08-03-2011 at 07:14 PM.

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

    Re: Auto-Populate a Sheet Based on Criteria in Another Sheet

    This little macro will do what you want:
    Please Login or Register  to view this content.
    1) Right-click the sheet tab and select VIEW CODE
    2) Paste the code given above into the VBA module that appears
    3) Close the VBEditor
    4) Save your workbook, in 2007+ save as .xlsm to enable macros


    Now, each time you bring the sheet up onscreen it will update again from the Data sheet.
    Last edited by JBeaucaire; 08-03-2011 at 11:15 PM.
    _________________
    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!)

  5. #5
    Registered User
    Join Date
    08-03-2011
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Auto-Populate a Sheet Based on Criteria in Another Sheet

    Works great! Thank you sir!!!

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

    Re: Auto-Populate a Sheet Based on Criteria in Another Sheet

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  7. #7
    Registered User
    Join Date
    06-22-2012
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Auto-Populate a Sheet Based on Criteria in Another Sheet

    Hi, I am trying to do something similar but am fairly new to macros. Could you please tell me how I can populate a new sheet with contats who's status is set to "positive"? I've been trying to tweak the above macro but cannot. Here is the basic information of my workbook.

    Sheet 1 is called "Master" and has all of the data
    Sheet 2 is called "Contacts" and is the sheet I would like to auto fill with "positive contacts"

    Columns A-BZ have data in them
    Row 1 has a heading (in both sheets)
    Rows 2:5010 have data in them (in the Master sheet)
    Column BX contains statuses (there are 12 total but only the positive ones will need to be added to the Contacts sheet)

    If you could please help me I would be very happy!

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Auto-Populate a Sheet Based on Criteria in Another Sheet

    Kristina,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed 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