Query a file based on a table, return results

Richard U

Active Member
Joined
Feb 14, 2006
Messages
406
Office Version
  1. 365
  2. 2016
  3. 2010
  4. 2007
Platform
  1. Windows
Sorry if this is simple, I am trying to teach myself power query and am not at all familiar with M

On the sheet, I have a list, and want to match it against a file and pull the rows that match the list.

The table I would be pulling would be like this

StopFinalINVPackage
NYCNYC
5551212​
JLO465
NYCDFW
5551212​
UIR131
NWKNWK
4445566​
NNY333
NWKDFWJJT331NNY333
LAXDFW
9995544​
NVT142
LAXGJT
9981431​
NN376
GJTGJT
1112213​
WNY114
GJTGJT
1112213​
WNY114
DFWDFW
8884454​
JJT331
DFWGJT
8884454​
JJT331
CAKCAK
5551212​
JJT331
OKCDFWJJT331WNY114

The matching table would be something like this

Locations
NYC
NWK
LAX
GJT
DEN
DFW
JFK
ABQ
OKC


StopFinalINVPackage
NYCNYC
5551212​
JLO465
NYCDFW
5551212​
UIR131
NWKNWK
4445566​
NNY333
NWKDFW
6675452​
NNY333
LAXDFW
9995544​
NVT142
LAXGJT
9981431​
NN376
GJTGJT
1112213​
WNY114
GJTGJT
1112213​
WNY114
DFWDFW
8884454​
JJT331
DFWGJT
8884454​
JJT331

The "Locations" would be in the importing spreadsheet, and the other table would be in a different file.

How would I query one against the other to get a results table that would only include locations in the matched table?

If someone can get me as far as the way to structure the query, I could probably figure it out from there
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
It's explained well here.... Posting this in case anyone else has the same question:

 
Upvote 0

Forum statistics

Threads
1,223,734
Messages
6,174,189
Members
452,550
Latest member
southernsquid2

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