![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 3
|
Good morning,
I am trying to get external data from the internet, but I need to plug in information from my spreadsheet into the URL automaticaly. I have numbers in colum A and I need to get data from each of them. They each have a different web page and I want to do it automatically. Is there a way to reference the Colum A and plug it into the URL? I am not sure if I am being clear enough to get the information I need, if you need more let me know. Thank you, Kurt Packard |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Here is some code I wrote for someone else.
The data located in column b is inserted into the URL. If you need more info, re-post Tom Private Sub CommandButton1_Click() Dim RowCntr Dim HyperName As String With ActiveSheet .Range("A4:A10000").ClearContents For RowCntr = 4 To 10000 If .Range("B" & RowCntr) <> "" Then HyperName = .Range("B" & RowCntr) .Hyperlinks.Add .Range("A" & RowCntr), _ "http://finance.yahoo.com/q?s=" & _ .Range("B" & RowCntr) & "&d=v1", _ TextToDisplay:=HyperName End If Next End With End Sub |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|