Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default How do I do this?

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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default How do I do this?

Just concatenate the constant with the cell value.

Ross


"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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default How do I do this?


"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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default How do I do this?


"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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default How do I do this?

I tried to use the HYPERLINK function but am getting a circular reference. In
cell B2 I inserted the following funciton:
=HYPERLINK(CONCATENATE("http://www.foo.com/id=",B2))

What am I doing wrong?


"Ross Culver" wrote:

Just concatenate the constant with the cell value.

Ross


"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!






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default How do I do this?

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





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I do this?

You are trying to assign to B2 some piece of text and the contents of B2...
you can't do that (hence, the circular reference error). B2 either contains
a value or a formula, it can't have both. Either put the formula in another
cell (say, C2) or you will need to use a macro of some sort if you want to
change the value in place.

Rick


"Big UT Fan" wrote in message
...
I tried to use the HYPERLINK function but am getting a circular reference.
In
cell B2 I inserted the following funciton:
=HYPERLINK(CONCATENATE("http://www.foo.com/id=",B2))

What am I doing wrong?


"Ross Culver" wrote:

Just concatenate the constant with the cell value.

Ross


"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!





  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default How do I do this?


So Rick...Are you saying that I still won't be able to do it using VBA as
suggested by Sandusky in the next reply?


"Rick Rothstein (MVP - VB)" wrote:

You are trying to assign to B2 some piece of text and the contents of B2...
you can't do that (hence, the circular reference error). B2 either contains
a value or a formula, it can't have both. Either put the formula in another
cell (say, C2) or you will need to use a macro of some sort if you want to
change the value in place.

Rick


"Big UT Fan" wrote in message
...
I tried to use the HYPERLINK function but am getting a circular reference.
In
cell B2 I inserted the following funciton:
=HYPERLINK(CONCATENATE("http://www.foo.com/id=",B2))

What am I doing wrong?


"Ross Culver" wrote:

Just concatenate the constant with the cell value.

Ross


"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!





  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I do this?

Yes you can use VBA (that is what I meant by "or you will need to use a
macro of some sort if you want to change the value in place"). The point of
my response dealt with this statement of yours...

In cell B2 I inserted the following funciton:
=HYPERLINK(CONCATENATE("http://www.foo.com/id=",B2))


Placing a formula referring to B2 in the cell B2 is what caused your
circular error. VBA (or a macro if you will) can write directly into a cell
because it is not "in" the cell itself (like a formula on the worksheet is);
rather, it is something that simply has the ability to act on a worksheet in
whole or in part.

Rick


"Big UT Fan" wrote in message
...

So Rick...Are you saying that I still won't be able to do it using VBA as
suggested by Sandusky in the next reply?


"Rick Rothstein (MVP - VB)" wrote:

You are trying to assign to B2 some piece of text and the contents of
B2...
you can't do that (hence, the circular reference error). B2 either
contains
a value or a formula, it can't have both. Either put the formula in
another
cell (say, C2) or you will need to use a macro of some sort if you want
to
change the value in place.

Rick


"Big UT Fan" wrote in message
...
I tried to use the HYPERLINK function but am getting a circular
reference.
In
cell B2 I inserted the following funciton:
=HYPERLINK(CONCATENATE("http://www.foo.com/id=",B2))

What am I doing wrong?


"Ross Culver" wrote:

Just concatenate the constant with the cell value.

Ross


"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!






  #10   Report Post  
Posted to microsoft.public.excel.programming
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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"