View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
MacGuy MacGuy is offline
external usenet poster
 
Posts: 25
Default How do I do this?

try this:

Sub LinkMe()

Range("a2").Select
For x = 1 To ActiveSheet.UsedRange.Rows.Count
tx = "http://www.url.com/id=" & ActiveCell.Value
ActiveCell.Formula = "=hyperlink(""" & tx & """)"
ActiveCell.Offset(1, 0).Select
Next x

End Sub

Given the list of data you want hyperlinked is continuous and it starts in
cell A2. I don't like using Select but it's simple code to get you started.


--
MacGuy


"Big UT Fan" wrote:

Thanks Guys. I'm confident what you put here with the Dim statement will
work but as I've never actually programmed in Excel I'm kind of lost here as
to what to do with this. Any pointers/tips?

"Sandusky" wrote:


"Big UT Fan" wrote in message
...
I'd like to take the values (numbers) in a particular column to a
hyperlink
in which the number is part of the url. For example, imagine a col of 5
digit #s. In cell A:2 is 12345. I want to change this to a hyperlink to
the
url http://www.url.com/id=12345. There has to be a way but I've never done
it. Thanks!


Dim tx as String
tx = "http://www.url.com/id=" & Range("A2").Value