ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Multiple Website Import (https://www.excelbanter.com/excel-programming/432222-multiple-website-import.html)

Ryan[_15_]

Multiple Website Import
 
I have a sheet populated with web address URLs in column A. I would
like to loop a macro that imports multiple URLs.

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://examplewebsite.com" _
, Destination:=Range("$A$1"))

Any way to make the "URL; call on a variable or cell address from
another sheet where I can loop through and have all websites import
rather than copy and pasting a rediculous amount of times?

Thanks,

Don Guillett

Multiple Website Import
 
for i = 1 to cells(rows.count,1).end(xlup).row
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://" & cells(i,1) & ".com" _
, Destination:=Range("$A$1"))
next i

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Ryan" wrote in message
...
I have a sheet populated with web address URLs in column A. I would
like to loop a macro that imports multiple URLs.

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://examplewebsite.com" _
, Destination:=Range("$A$1"))

Any way to make the "URL; call on a variable or cell address from
another sheet where I can loop through and have all websites import
rather than copy and pasting a rediculous amount of times?

Thanks,



Ryan[_15_]

Multiple Website Import
 
On Aug 10, 9:57*am, "Don Guillett" wrote:
for i = 1 to cells(rows.count,1).end(xlup).row
*With ActiveSheet.QueryTables.Add(Connection:= _
* * * * "URL;http://" & cells(i,1) & ".com" _
* * * * , Destination:=Range("$A$1"))
next i

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Ryan" wrote in message

...



I have a sheet populated with web address URLs in column A. *I would
like to loop a macro that imports multiple URLs.


* *With ActiveSheet.QueryTables.Add(Connection:= _
* * * *"URL;http://examplewebsite.com" _
* * * *, Destination:=Range("$A$1"))


Any way to make the "URL; call on a variable or cell address from
another sheet where I can loop through and have all websites import
rather than copy and pasting a rediculous amount of times?


Thanks,- Hide quoted text -


- Show quoted text -


Thanks, I actually worked through what you gave me and got it to
work. Nice job, thanks a lot.

Don Guillett

Multiple Website Import
 
Let me see your code. Perhaps it could be as simple as something like....
for i = 1 to 5
Sheet1,A" & i & " Sheet1,B" & i & " & _
"softwaredistribution.example.org/sysstcmanager/stcview.aspx?
server=SERVER1 stcview.aspx?server=SERVER" & i
next i

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Ryan" wrote in message
...
On Aug 10, 9:57 am, "Don Guillett" wrote:
for i = 1 to cells(rows.count,1).end(xlup).row
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://" & cells(i,1) & ".com" _
, Destination:=Range("$A$1"))
next i

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Ryan" wrote in message

...



I have a sheet populated with web address URLs in column A. I would
like to loop a macro that imports multiple URLs.


With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://examplewebsite.com" _
, Destination:=Range("$A$1"))


Any way to make the "URL; call on a variable or cell address from
another sheet where I can loop through and have all websites import
rather than copy and pasting a rediculous amount of times?


Thanks,- Hide quoted text -


- Show quoted text -


Thanks, I actually worked through what you gave me and got it to
work. Nice job, thanks a lot.



All times are GMT +1. The time now is 03:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com