Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hey guys-
Got a simple little script here that someone else wrote for me. It hyperlinks contents from one column to the contents of another. Problem is, when one or more cells are blank in either column (either the location or the friendlyname column), the macro breaks. I need something that will tell it to ignore blank cells and keep going until the end. Can someone tell me how to do this? Thanks! Here's the code... Sub CreateLinks() Dim LinkRange As Range, cell As Range Set LinkRange = Range("G1", Range("G65536").End(xlUp)) For Each cell In LinkRange ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _ Range("R" & cell.Row).Value, TextToDisplay:=cell.Value Range("R" & cell.Row).ClearContents Next End Sub Thanks! D |
#2
![]()
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Sub CreateLinks()
Dim LinkRange As Range, cell As Range Set LinkRange = Range("G1", Range("G65536").End(xlUp)) On Error Resume Next For Each cell In LinkRange ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _ Range("R" & cell.Row).Value, TextToDisplay:=cell.Value Range("R" & cell.Row).ClearContents Next End Sub -- Regards, Tom Ogilvy "D" wrote in message news:XDbSc.26608$Oi.437@fed1read04... Hey guys- Got a simple little script here that someone else wrote for me. It hyperlinks contents from one column to the contents of another. Problem is, when one or more cells are blank in either column (either the location or the friendlyname column), the macro breaks. I need something that will tell it to ignore blank cells and keep going until the end. Can someone tell me how to do this? Thanks! Here's the code... Sub CreateLinks() Dim LinkRange As Range, cell As Range Set LinkRange = Range("G1", Range("G65536").End(xlUp)) For Each cell In LinkRange ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _ Range("R" & cell.Row).Value, TextToDisplay:=cell.Value Range("R" & cell.Row).ClearContents Next End Sub Thanks! D |
#3
![]()
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Tom- once again, you DA MAN!!! Thank you!!!
"Tom Ogilvy" wrote in message ... Sub CreateLinks() Dim LinkRange As Range, cell As Range Set LinkRange = Range("G1", Range("G65536").End(xlUp)) On Error Resume Next For Each cell In LinkRange ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _ Range("R" & cell.Row).Value, TextToDisplay:=cell.Value Range("R" & cell.Row).ClearContents Next End Sub -- Regards, Tom Ogilvy "D" wrote in message news:XDbSc.26608$Oi.437@fed1read04... Hey guys- Got a simple little script here that someone else wrote for me. It hyperlinks contents from one column to the contents of another. Problem is, when one or more cells are blank in either column (either the location or the friendlyname column), the macro breaks. I need something that will tell it to ignore blank cells and keep going until the end. Can someone tell me how to do this? Thanks! Here's the code... Sub CreateLinks() Dim LinkRange As Range, cell As Range Set LinkRange = Range("G1", Range("G65536").End(xlUp)) For Each cell In LinkRange ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _ Range("R" & cell.Row).Value, TextToDisplay:=cell.Value Range("R" & cell.Row).ClearContents Next End Sub Thanks! D |
#4
![]()
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Tom-
Got a problem here. If the value of the Friendly name is a number, it will not link it. If it starts with a letter or anything except a number, it links it. Is there a way to make this hyperlink even when the friendlyname is a number value? Thanks D "D" wrote in message news:eMbSc.26609$Oi.13973@fed1read04... Tom- once again, you DA MAN!!! Thank you!!! "Tom Ogilvy" wrote in message ... Sub CreateLinks() Dim LinkRange As Range, cell As Range Set LinkRange = Range("G1", Range("G65536").End(xlUp)) On Error Resume Next For Each cell In LinkRange ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _ Range("R" & cell.Row).Value, TextToDisplay:=cell.Value Range("R" & cell.Row).ClearContents Next End Sub -- Regards, Tom Ogilvy "D" wrote in message news:XDbSc.26608$Oi.437@fed1read04... Hey guys- Got a simple little script here that someone else wrote for me. It hyperlinks contents from one column to the contents of another. Problem is, when one or more cells are blank in either column (either the location or the friendlyname column), the macro breaks. I need something that will tell it to ignore blank cells and keep going until the end. Can someone tell me how to do this? Thanks! Here's the code... Sub CreateLinks() Dim LinkRange As Range, cell As Range Set LinkRange = Range("G1", Range("G65536").End(xlUp)) For Each cell In LinkRange ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _ Range("R" & cell.Row).Value, TextToDisplay:=cell.Value Range("R" & cell.Row).ClearContents Next End Sub Thanks! D |
#5
![]()
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hard to tell without knowing some specifics, but try this: Assume the
Friendly name is Range("R" & cell.row)Value Sub CreateLinks() Dim LinkRange As Range, cell As Range Set LinkRange = Range("G1", Range("G65536").End(xlUp)) On Error Resume Next For Each cell In LinkRange ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _ format(Range("R" & cell.Row).Value,"@"), TextToDisplay:=cell.Value Range("R" & cell.Row).ClearContents Next End Sub -- Regards, Tom Ogilvy "D" wrote in message news:KxcSc.26612$Oi.18696@fed1read04... Tom- Got a problem here. If the value of the Friendly name is a number, it will not link it. If it starts with a letter or anything except a number, it links it. Is there a way to make this hyperlink even when the friendlyname is a number value? Thanks D "D" wrote in message news:eMbSc.26609$Oi.13973@fed1read04... Tom- once again, you DA MAN!!! Thank you!!! "Tom Ogilvy" wrote in message ... Sub CreateLinks() Dim LinkRange As Range, cell As Range Set LinkRange = Range("G1", Range("G65536").End(xlUp)) On Error Resume Next For Each cell In LinkRange ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _ Range("R" & cell.Row).Value, TextToDisplay:=cell.Value Range("R" & cell.Row).ClearContents Next End Sub -- Regards, Tom Ogilvy "D" wrote in message news:XDbSc.26608$Oi.437@fed1read04... Hey guys- Got a simple little script here that someone else wrote for me. It hyperlinks contents from one column to the contents of another. Problem is, when one or more cells are blank in either column (either the location or the friendlyname column), the macro breaks. I need something that will tell it to ignore blank cells and keep going until the end. Can someone tell me how to do this? Thanks! Here's the code... Sub CreateLinks() Dim LinkRange As Range, cell As Range Set LinkRange = Range("G1", Range("G65536").End(xlUp)) For Each cell In LinkRange ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _ Range("R" & cell.Row).Value, TextToDisplay:=cell.Value Range("R" & cell.Row).ClearContents Next End Sub Thanks! D |
#6
![]()
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
hmmm- nope- no go. Didn't do anything. Maybe I have to do a macro to go in,
add a letter or apostrophe, hyperlink it, then delete it. What a pain... Thanks D "Tom Ogilvy" wrote in message ... Hard to tell without knowing some specifics, but try this: Assume the Friendly name is Range("R" & cell.row)Value Sub CreateLinks() Dim LinkRange As Range, cell As Range Set LinkRange = Range("G1", Range("G65536").End(xlUp)) On Error Resume Next For Each cell In LinkRange ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _ format(Range("R" & cell.Row).Value,"@"), TextToDisplay:=cell.Value Range("R" & cell.Row).ClearContents Next End Sub -- Regards, Tom Ogilvy "D" wrote in message news:KxcSc.26612$Oi.18696@fed1read04... Tom- Got a problem here. If the value of the Friendly name is a number, it will not link it. If it starts with a letter or anything except a number, it links it. Is there a way to make this hyperlink even when the friendlyname is a number value? Thanks D "D" wrote in message news:eMbSc.26609$Oi.13973@fed1read04... Tom- once again, you DA MAN!!! Thank you!!! "Tom Ogilvy" wrote in message ... Sub CreateLinks() Dim LinkRange As Range, cell As Range Set LinkRange = Range("G1", Range("G65536").End(xlUp)) On Error Resume Next For Each cell In LinkRange ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _ Range("R" & cell.Row).Value, TextToDisplay:=cell.Value Range("R" & cell.Row).ClearContents Next End Sub -- Regards, Tom Ogilvy "D" wrote in message news:XDbSc.26608$Oi.437@fed1read04... Hey guys- Got a simple little script here that someone else wrote for me. It hyperlinks contents from one column to the contents of another. Problem is, when one or more cells are blank in either column (either the location or the friendlyname column), the macro breaks. I need something that will tell it to ignore blank cells and keep going until the end. Can someone tell me how to do this? Thanks! Here's the code... Sub CreateLinks() Dim LinkRange As Range, cell As Range Set LinkRange = Range("G1", Range("G65536").End(xlUp)) For Each cell In LinkRange ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _ Range("R" & cell.Row).Value, TextToDisplay:=cell.Value Range("R" & cell.Row).ClearContents Next End Sub Thanks! D |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sorry but i am stuck again | New Users to Excel | |||
Im stuck again... | Excel Discussion (Misc queries) | |||
This ones got me stuck | Excel Worksheet Functions | |||
stuck | Excel Worksheet Functions | |||
Still stuck | Excel Programming |