Combining queries

DRSteele

Well-known Member
Joined
Mar 31, 2015
Messages
2,667
Office Version
  1. 365
Platform
  1. Windows
Can someone please help me?

I have ten queries that all refer to the same website, but different pages, and load to ten worksheets. I would like to make a consolidated table out of the ten queries or the ten tables created by them. How can I do so?

FYI. This is the website: www1 dot nhl.com/ice/standings.htm?season=20052006&type=lea

I then changed 20052006 to 20062007 and so on to create the ten queries. Note that the website is www1 and that it seems to be a legacy website, so any clicks you make on it go to the new website that starts with www.

Also, is there a better way I could have done this? I'm trying to create a large table of all the seasons.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Yes there is a better way. Read my blog post here that shows you how to create a function from the first query, and then pass parameters to The function so it combines multiple queries together. Combine Excel Workbooks with Power Query – Method 1 -

my demo is importing a workbook, then passing a list of workbooks to the function. What you want to do is semantically the same, just that you have 1 web page address followed by many similar pages (I assume they are the same structure anyway). In my demo you load a list of workbooks. When you do it, you will need to load a list of URL variants.

Hope me that makes sense.
 
Upvote 0
Thank you kindly for your prompt and detailed response. I'm chewing though your demo and trying to make it work.

The main obstacle is that the website itself keeps changing the layout of all the tables. It's almost quicker to cut-and-paste the data into Excel. I'm beginning to suspect that these sports websites don't want us to scrape the data.
 
Upvote 0

Forum statistics

Threads
1,226,735
Messages
6,192,732
Members
453,752
Latest member
Austin2222

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