Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can a macro create a hyperlink with unique cell information?
I am trying to create a macro that take the information in a cell and add it
to the end of a hyperlink. I need to repeat this function numerous times with different cell information. PLEASE HELP!!! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can a macro create a hyperlink with unique cell information?
Look in Excel help at the worksheetFunction Hyperlink
You don't need a macro. -- Regards, Tom Ogilvy "Desiree" wrote in message ... I am trying to create a macro that take the information in a cell and add it to the end of a hyperlink. I need to repeat this function numerous times with different cell information. PLEASE HELP!!! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can a macro create a hyperlink with unique cell information?
Tom,
I can not use a worksheet Function due to the fact the last 6 characters of the hyperlink are contacted in that cell. I need to be able to leave the cell contents alone and add the hyperlink with the last 6 characters added. Desiree "Tom Ogilvy" wrote: Look in Excel help at the worksheetFunction Hyperlink You don't need a macro. -- Regards, Tom Ogilvy "Desiree" wrote in message ... I am trying to create a macro that take the information in a cell and add it to the end of a hyperlink. I need to repeat this function numerous times with different cell information. PLEASE HELP!!! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can a macro create a hyperlink with unique cell information?
Not sure what
last 6 characters of the hyperlink are contacted in that cell. means, but unless you need the hyperlink placed in the cell with the information (rather than another cell that uses the information), then a worksheetfunction can be used. However, if you want a macro, turn on the macro recorder and add the hyperlink manually. Turn off the macro recorder and alter the code to construct the URL you want and pass it as an argument to the hyperlink.ADD method that you recorded. This is what i recorded: ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _ "http://www.msnbc.msn.com/id/6306132/", TextToDisplay:="A" so lets say the cell contains 6306132 I would modify it to ActiveSheet.Hyperlinks.Add Anchor:=ActiveCell, Address:= _ "http://www.msnbc.msn.com/id/" & Activecell.Value & "/", _ TextToDisplay:=ActiveCell.Value now I could add a loop to go through my cells selected Sub AddLinks() for each cell in Selection cell.Activate ActiveSheet.Hyperlinks.Add Anchor:=ActiveCell, Address:= _ "http://www.msnbc.msn.com/id/" & Activecell.Value & "/", _ TextToDisplay:=ActiveCell.Value Next End sub -- Regards, Tom Ogilvy "Desiree" wrote in message ... Tom, I can not use a worksheet Function due to the fact the last 6 characters of the hyperlink are contacted in that cell. I need to be able to leave the cell contents alone and add the hyperlink with the last 6 characters added. Desiree "Tom Ogilvy" wrote: Look in Excel help at the worksheetFunction Hyperlink You don't need a macro. -- Regards, Tom Ogilvy "Desiree" wrote in message ... I am trying to create a macro that take the information in a cell and add it to the end of a hyperlink. I need to repeat this function numerous times with different cell information. PLEASE HELP!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
hyperlink to website and then to information in a certain cell | Excel Worksheet Functions | |||
In excel, how do I enter unique cell information in a column | Excel Worksheet Functions | |||
How to Create a Macro to Edit a Variable Amount of Information | New Users to Excel | |||
How do I create a hyperlink to a cell with the hyperlink function | Excel Worksheet Functions | |||
Create a HYPERLINK with a macro? | Excel Programming |