2019 Power Query

127bit

New Member
Joined
Nov 9, 2021
Messages
10
Office Version
  1. 2013
Platform
  1. Windows
I am currently executing multiple queries that pull the same kind of data from one source, ie:
etc.

Is there a way to pass a variable (value1) to one query, execute it, then pass the next variable (value2) to it and execute again? I'm wondering if it would be more efficient than executing numerous queries to the same site with just the last value changing.
Thanks.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
If you are looking to have all the pages combined into one query, then run multiple queries and then combine (append) then to each other. Is this what you want to do or am I missing something in your explanation.
 
Upvote 0
Hello Alan, thanks for picking this up.
Specifically, this workbook has dozens of queries that grab stock prices and other data from the same site, and presents them as a portfolio-tracking table. Since they are the same querying the same data source with just the ticker changed each time, I wondered if this has grown to become inefficient. Should it instead make one connection to the page and keep re-using it with a new variable (ticker) each time? If yes, how?
Thanks.
 
Upvote 0
Yes. Build a parameter query in Power Query. Here is an example from MrE on how to build a parameter query.

 
Upvote 0

Forum statistics

Threads
1,214,551
Messages
6,120,156
Members
448,948
Latest member
spamiki

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