Connecting to multiple named ranges in a single workbook

NickonPhil

New Member
Joined
Jul 30, 2018
Messages
2
Hi all,
I am trying to connect to 'named ranges' on separate worksheets in multiple workbooks (each workbook has the same content / layout / sheets / named ranges), and I am pointing 'get data' to the directory containing the workbooks, for example:

Get Data = C:\My Books\ in the My Books directory is a set of Excel workbooks named Jan 2018.xlsx, Feb 2018.xlsx, Mar 2018.xlsx etc.
Each workbook has 3 worksheets - call them Fruit, Veg, Meat, and each worksheet has a 'named range' (I'd like to convert them to tables in the worksheets but due to formatting in the worksheets outside of my control I can't do that). So let's say we have worksheet Fruit with a named range 'fruit_data', a worksheet Veg with a named range 'veg_data', and a worksheet Meat with a named range 'meat_data.

I would like to be able to load the 'named ranges' from each worksheet, in each workbook into it's own table, appending the corresponding named ranges from the other worksheets, but also add the filename as a column in each table created like the below example for the fruit_data named range:

Table = fruit_data
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Source.Name[/TD]
[TD]Product[/TD]
[TD]Qty[/TD]
[TD]Price[/TD]
[/TR]
[TR]
[TD]Jan 2018[/TD]
[TD]Apples[/TD]
[TD]100[/TD]
[TD]5.00[/TD]
[/TR]
[TR]
[TD]Jan 2018[/TD]
[TD]Oranges[/TD]
[TD]500[/TD]
[TD]11.00[/TD]
[/TR]
[TR]
[TD]Feb 2018[/TD]
[TD]Apples[/TD]
[TD]300[/TD]
[TD]12.00[/TD]
[/TR]
[TR]
[TD]Mar 2018[/TD]
[TD]banana's[/TD]
[TD]120[/TD]
[TD]15.00[/TD]
[/TR]
</tbody>[/TABLE]

A similar table for the meat_data named range:
Table = meat_data
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Source.name[/TD]
[TD]Product[/TD]
[TD]Weight (kg)[/TD]
[TD]Price[/TD]
[/TR]
[TR]
[TD]Jan 2018[/TD]
[TD]Beef[/TD]
[TD]3.00[/TD]
[TD]24.00[/TD]
[/TR]
[TR]
[TD]Feb 2018[/TD]
[TD]Lamb[/TD]
[TD]8.00[/TD]
[TD]46.00[/TD]
[/TR]
[TR]
[TD]Feb 2018[/TD]
[TD]Chicken[/TD]
[TD]18.00[/TD]
[TD]102.00[/TD]
[/TR]
[TR]
[TD]Mar 2018[/TD]
[TD]Beef[/TD]
[TD]7.00[/TD]
[TD]44.00[/TD]
[/TR]
</tbody>[/TABLE]

Is this possible? Can anybody provide instructions to accomplish the above?

Thanks
Phil
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,226,237
Messages
6,189,792
Members
453,568
Latest member
LaTwiglet85

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