I feel that this could be accomplished using spill formulas, however as I don't have those in my version I'll offer a power query based solution.
1. Convert the data on the TI sheet into an Excel table (tbl_SiteID)
2. Convert cells E1:E2 on the DistanceCalculatorByZip sheet into an Excel table (tbl_MarketSelection)
3. Make a connection only to tbl_MarketSelection
4. Use the following power query editor code to produce the table in column N:
let
Criteria = tbl_MarketSelection,
Source = Excel.CurrentWorkbook(){[Name="tbl_SiteID"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Market", type text}, {"Site ID", type text}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Market] = tbl_MarketSelection)),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Market"})
in
#"Removed Columns"
Note that after the text in cell E2 is changed the table in column N will need to be refreshed.
Here is a link to a video tutorial that may better explain the process.
Let us know if you have any questions.
Bookmarks