+ Reply to Thread
Results 1 to 5 of 5

Table Automatically Filters Entries to New Table Based on Criteria

  1. #1
    Registered User
    Join Date
    12-07-2016
    Location
    Illinois
    MS-Off Ver
    2010
    Posts
    26

    Table Automatically Filters Entries to New Table Based on Criteria

    I have a master list of chemical result data. It contains columns for productID, fat%, protein%, salt content, etc. and then a final column called "COA Acceptable?" that will contain 'Yes' or 'No'.
    I need the table to automatically filter all data with a 'Yes' in the "COA Acceptable" column to a new table.

    The problem is that the unfiltered raw table (call it the Master List) is updated daily and will constantly have new entries added. Therefore, I need a way to automatically filter the data to the COA Acceptable table, without having to Advanced Filter the data every time I add a new entry. I tried to record a Macro to auto-filter the data, but it is not working.

    Is there a way to accomplish this?

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,721

    Re: Table Automatically Filters Entries to New Table Based on Criteria

    You could use a helper column next to the COA Acceptable? column with a formula which identifies "Yes" records and allocates a unique sequential number to them. This can be copied down beyond your current data, in order to accept new data that is added.

    Then you can use a simple INDEX/MATCH formula to fill your second table with the appropriate records.

    I can show you how to do this if you attach a sample Excel workbook.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    12-07-2016
    Location
    Illinois
    MS-Off Ver
    2010
    Posts
    26

    Re: Table Automatically Filters Entries to New Table Based on Criteria

    I have attached an example
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-07-2016
    Location
    Illinois
    MS-Off Ver
    2010
    Posts
    26

    Re: Table Automatically Filters Entries to New Table Based on Criteria

    The workbook should be attached.
    Attached Files Attached Files

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,721

    Re: Table Automatically Filters Entries to New Table Based on Criteria

    Put this formula in cell P2 of Sheet1:

    =IF(O2="Yes",MAX(P$1:P1)+1,"-")

    then copy down to beyond the bottom of your data in order to accommodate new data being added. This allocates a unique sequential number to each record that has Yes in column O.

    Then you can use this formula in P2 of Sheet2:

    =IFERROR(MATCH(ROWS($1:1),Sheet1!P:P,0),"")

    which when copied down finds the rows where the first, second, third etc. matching record exists on Sheet1.

    Then you can put this formula in cell A2 of Sheet2:

    =IF($P2="","",INDEX(Sheet1!A:A,$P2))

    which can be copied across to bring the appropriate data across for that matching record.

    Finally, you can copy the formulae in row 2 down as far as you need them. The attached file shows this in operation.

    Hope this helps.

    Pete
    Attached Files Attached Files

+ 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. Need to create a table that essentially filters based upon one criteria
    By GreenSmoak in forum Excel Charting & Pivots
    Replies: 9
    Last Post: 03-11-2016, 04:08 PM
  2. Replies: 1
    Last Post: 07-16-2015, 05:46 AM
  3. Replies: 0
    Last Post: 01-19-2015, 11:00 AM
  4. Automatically copying data into a new table based on 2 column criteria
    By gtdread in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-28-2014, 12:25 PM
  5. [SOLVED] Create Filters for a Table based on what is visible in another table
    By GeneralDisarray in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-17-2013, 03:48 PM
  6. [SOLVED] Automatically populate a table with slected data based on criteria
    By smithrog in forum Excel General
    Replies: 7
    Last Post: 07-01-2013, 03:52 AM
  7. Extracting data from a table based on a common entries with another table
    By shannoncox in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-31-2012, 04:45 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