Parameter to reference a certain cell to input the date into a URL

robersha

New Member
Joined
Nov 7, 2013
Messages
27
Hello Everyone.

I have searched the web with no luck on finding an answer on what I need to do. Here is hoping someone on here can help me out.

I have a workbook that is pulling data for every hour of the day from an internal website. The macro is built to pull data 24 times (each hour)

ex.(http://url/[""2014/04/01""]/starthour0/endhour1/)
(http://url/[""2014/04/01""]/starthour1/endhour2/)
(http://url/[""2014/04/01""]/starthour2/endhour3/) and so on.

What I am trying to do is set up a parameter that will reference a certain cell (Master!K5) which will contain the date I need to pull. I want to be able to have that cell referenced automatically and input the date for each URL in the macro.

Is this a possibility? Any and all advice appreciated!

Thanks in advance!
 

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.
Thanks for your help. I was able to find an answer after an extensive Google Search. Here is what I found:

If the URL you are pulling data from has a date within, replace the date with the following code:

Code:
" & Format(Range("K5"), "yyyy/mm/dd") & "

So if the website is "http://www.google.com/2014/04/16/search/awlfkl", your code would look like:

Code:
"http://www.google.com/" & Format(Range("K5"), "yyyy/mm/dd") & "/search/awlfkl"

This will allow you to reference a certain cell on your sheet.
 
Upvote 0

Forum statistics

Threads
1,216,087
Messages
6,128,740
Members
449,466
Latest member
Peter Juhnke

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