I have been struggling with this for a few days.
I am looking to combine data from several web queries onto one worksheet (ie create a database)
The web addresses are all similar accept for one section which is variable. Further the number of web address I need to loop through will vary. Lastly, the output of each web query will have a variable number of rows.
What I have done to set this up:
I have one web query which pulls in master data which I then use a formula to create the multiple web queries I will need to loop through. I manually named each cell which contains the web addresses (ie WQ_1, WQ_2, etc). I did this for 200 rows to make sure it will be robust enough to handle all possible addresses. I included an if statement which sets the sell equal to 1 if the formula returns no web address.
My initial attempt included pulling the first web query (refrencing the named range) then you using an if statement (IF WQ_2 = 1 then exit sub else). I could hypothetically do this for each of the 200 named ranges, but that seems a bit extreme. Any help making that more efficient would be awesome.
Lastly, since the rows returned will be variable, I need to either insert the next query above the previous or go to then end (which is variable). I also need to remove the 1st two rows of output from each web query so it returns only the data (no headers).
Wow, this is a long first post. Anyways, any help would be appreciated.
Thanks
Mike
Bookmarks