Extract data from one table to another based on criteria

Gwill1983

Board Regular
Joined
Oct 24, 2018
Messages
123
Office Version
  1. 365
Platform
  1. Windows
Hi all

I am attempting to extract data from a large table into a smaller table depending on a couple of criteria (referencing other cells)

I have a report date (cell B1) and a hold type (cell J1). My raw data table is in a seperate tab named 'data' with the columns as below:

Event NoCustEGEPOTEvent DescWHOrder DateReq DateEst DespPO Worst Case#StValueAlloc ValueAlloc%OS Invoice#No POB2BHoldWait ReasonReport DatePrevious Report DateLookup ref1Lookup ref2Previous Report Wait ReasonPO Status Value

What I am aiming to do is to have a new table in my summary sheet which pulls ALL results from the raw data table as long as the report date in B1 matches the report date in column V of the raw data, and the hold type in J1 matches the hold type in column U (wait reason). The amount of returned rows will vary so I am struggling a little with how to ensure that all are included.

I hope that makes sense.......

Happy to provide more information if required
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
How about
Excel Formula:
=FILTER(A1:AA1000,(V1:V1000=B1)*(U1:U1000=J1))
 
Upvote 0
Hi.

That worked, but returned all columns! Do you know of a way of specifying which columns to return?
 
Upvote 0
Do you have headers where you want the data that exactly match the headers on the data sheet?
If so what are they & where are they?
 
Upvote 0
Yes,
my original table is named RawData and the new table will be going onto summary sheet. I currently am trying to make FILTER and CHOOSE work with the formula below:
=FILTER(CHOOSE({1,2,3,4,5,6,7},RawData[Event No],RawData[Cust],RawData[EG],RawData[OS Invoice],RawData[Hold]),(RawData[Report Date]='Summary Sheet'!B1*RawData[Wait Reason]=SummarySheet!J1))

This is returning #REF so clearly something isn't quite right.

The columns that I would like to return are:
Event No
Cust
EG
OS Invoice
Hold
Report Date
Wait Reason
 
Upvote 0
As long as the summary headers are in the same order as the table, you can do it like this
+Fluff 1.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAA
115/12/202115/12/2021
2Event NoCustEGEPOTEvent DescWHOrder DateReq DateEst DespPO Worst Case#StValueAlloc ValueAlloc%OS Invoice#No POB2BHoldWait ReasonReport DatePrevious Report DateLookup ref1Lookup ref2Previous Report Wait ReasonPO Status Value
3abcdefghijklmnopqrst15/12/202115/12/2021wxyzaa
4
5
6
7Event NoCustEGOS InvoiceHoldWait ReasonReport Date
8abcqt15/12/202115/12/2021
9
Main
Cell Formulas
RangeFormula
A8:G8A8=FILTER(FILTER(Table2,(Table2[Report Date]=B1)*(Table2[Wait Reason]=J1)),ISNUMBER(MATCH(Table2[#Headers],A7:G7,0)))
Dynamic array formulas.
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top