loop through time range and replace variables

backgun

New Member
Joined
Jan 10, 2023
Messages
3
Office Version
  1. 2021
  2. 2019
Platform
  1. Windows
Hello
i've got a Makro which calls a link and it download a cvs file.
This link needs 6 variables to work, example:

h t t p s : //blabla.com/ startdate=var1 & starthour=var2 & startmin=var3 .. etc
would result in
h t t p s : //blabla.com/ startdate=2023/01/06 & starthour=23 & startmin=30.. etc
see picture

-now i need a download for each hour between a time range
the time range is given in the Column P,R,S

means:
get the var date out of the first row (timerange)
then call makro1
then replace the variables (var1,var2..) with the next time dates
then call again makro1
and so on until the last timerangecell reached.

hope s1 can help me out, thanks together
 

Attachments

  • excel-vba.JPG
    excel-vba.JPG
    115.2 KB · Views: 12

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
get the date out of the first row (timerange) store this into var1 (date) var2(hour) var3(minutes)
and add 1 hour to the given time and store this into var4,5,6
then call makro1
then replace the variables (var1,var2..) with the next time dates
then call again makro1
and so on until the last timerangecell reached.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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