You might be able to use MS Query to extract Excel ranges from your
two wkshts. This works for consolidating data from the active workbook (Just save it first so Excel can find it):
This example uses 2 named ranges in the current workbook.
(Each range contain 4 columns: Dept, PartNum, Desc, Price)
Assumptions:
The data in each sheet is structured like a table:
--->Col headings (Dept, PartNum, Desc, Price)
--->Columns are in the same order.
The data in each sheet is in named ranges.
--->I used rngSht1Data and rngSht2Data
(Note: MS Query may display warnings about it's ability to show the query
...ignore them and proceed.)
Starting with an empty worksheet:
1)Select the cell where you want the extracted data to start
2)<Data><Import External Data><New Database Query>
• Databases: Excel Files
Browse to the current file, pick the ONE range to import.
--->Accept defaults until the next step.
At The last screen select the <View data/Edit the Query> option.
Click the [SQL] button
Replace the displayed SQL code with an adapted version of this:
SELECT
rngSht1Data.Dept,
rngSht1Data.PartNum,
rngSht2Data.Desc,
rngSht2Data.Price
FROM
`C:\MyWkbk`.rngSht1Data rngSht1Data,
`C:\MyWkbk`.rngSht1Data rngSht2Data
WHERE
rngSht1Data.Dept = rngSht2Data.Dept AND
rngSht1Data.PartNum = rngSht2Data.PartNum
Note: Apostrophes in the SQL code ( ` )are located on the tilde key (~)
Return the data to Excel.
Once that is done....to get the latest data just:
Right Click in the data range
...<Refresh Data>
You can edit the query SQL at any time to
add/remove data sources and/or fields.
Is that something you can work with?
Bookmarks