#1
|
|||
|
|||
extract data from table based on data from another table
I have table A, which contains thousands of rows. This table has an ID to every row.
Only part of the rows in Table A interests me. Thus, I have created a second table, B, which contains only one column, ID. Table B is the criteria for extracting the relevant rows from Table A. I want to create table C, which will contain only the relevant rows from A. Another issue: data in Table A changes frequently. How do I do that in Excel? Preferably automatically. Thanks Last edited by zevbn; 12-02-2023 at 11:14 PM. |
#2
|
|||
|
|||
Why bother with separate tables?
Simply add a column to your table (e.g. with header InList), which displays some info about index for this row being registered in second table (TRUE or False, or "Listed", or whatever) using VLOOKUP(). Then set the filter on for your 1st table. Now you can set the filter for your table for only rows listed in second table to be displayed whenever you need this - simply by clicking on filter triangle on InList header, and setting the filter condition (e.g. to TRUE or False or Display All). |
#3
|
||||
|
||||
What version of Excel?
Best attach a workbook with this setup. |
#4
|
|||
|
|||
Windows 10, Office 2021
|
#5
|
||||
|
||||
In the absence of a workbook:
Code:
=FILTER(TableA,ISNUMBER(MATCH(TableA[ID],TableB[ID],0)),"None found") |
#6
|
|||
|
|||
Attached is an example of solution I described in my previous post.
In Table on sheet Data are 11 rows of data with different ID values. In Table on sheet IdList are entered ID's you want to follow. For Table on sheet Data is set a filter for column InList = TRUE, so only rows you want to follow are displayed. In case you add new records to filtered Table on sheet Data, you have to refresh the filer to get the table filtered properly (obviously new ID's are missing from IdList Table, so you must get those entries to be hidden - or add them to IdList Table too). With Table I mean Defined Table. |
#7
|
|||
|
|||
Thanks a lot
|
#8
|
||||
|
||||
Please mark thread as solved ( under "thread tools"). Thx
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
Tags |
extract criteria |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
extract data from word table | thiennguyen93 | Word VBA | 1 | 07-27-2022 07:16 AM |
Extract data from multiple table | a4avinash | Excel | 4 | 02-28-2022 08:30 AM |
Automatically extract data from a table into another word document | OfficeAssociate99 | Word VBA | 1 | 05-28-2017 11:19 PM |
extract specific pivot table data to a new sheet | theexpat | Excel Programming | 0 | 02-18-2016 10:08 AM |
How to Extract Data from table based on pattern. | PRA007 | Word Tables | 4 | 03-17-2015 11:05 PM |