How do I add .htm to every link in a worksheet? Multiple hyperlinks+targets

K

KJones

I have about 500 hyperlinks in my worksheets. An example of 1 of th
links = "..dvd/1994/940602"

As you can see, i forgot to use the file extension i wanted to link t
(*.htm) Is there a way to edit 500 links by automatically adding .ht
to each one with out me going the manual route. i
"..dvd/1994/940602.htm"

Also how do i change the "_parent" to "main" so all the links open i
the main window, and not just a new page.

When i have the page saved as html, i can go in find and replace i
wordpad which easily changes the links (searched on "target = "_parent
and changed to .htm" target ="main")

How is this possible in excel, why cant i open excel in a text editor
excelpipe doesnt help. Any other help is appreciated
 
J

Jason Morin

=HYPERLINK(A1&".htm")

and fill the formula down.

HTH
Jason
Atlanta, GA
-----Original Message-----

I have about 500 hyperlinks in my worksheets. An example of 1 of the
links = "..dvd/1994/940602"

As you can see, i forgot to use the file extension i wanted to link to
(*.htm) Is there a way to edit 500 links by automatically adding .htm
to each one with out me going the manual route. ie
"..dvd/1994/940602.htm"

Also how do i change the "_parent" to "main" so all the links open in
the main window, and not just a new page.

When i have the page saved as html, i can go in find and replace in
wordpad which easily changes the links (searched on "target = "_parent"
and changed to .htm" target ="main")

How is this possible in excel, why cant i open excel in a text editor,
excelpipe doesnt help. Any other help is appreciated,


------------------------------------------------

~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step
guide to creating financial statements
 
K

KJones

Hello

Thanks for a quick response

But, in my cell is a link name and the short hyperlink is in the
hyperlink options. When i use =hyperlink(d26&".htm") i get the
contents of that cell and .htm not the hyperlink from that cell and
..htm. Also this has to be done in a different cell to the one where
want it and will take a while to do 500. :(
 
T

Tom Ogilvy

You can use a macro

sub UpdateLink()
Dim hlink as Hyperlink
for each hlink in ActiveSheet.Hyperlinks
if instr(1,hlink.Address,"htm",vbTextCompare) then
hlink.address = hlink.address & ".htm"
end if
Next
End sub

--
Regards,
Tom Ogilvy


KJones said:
I have about 500 hyperlinks in my worksheets. An example of 1 of the
links = "..dvd/1994/940602"

As you can see, i forgot to use the file extension i wanted to link to
(*.htm) Is there a way to edit 500 links by automatically adding .htm
to each one with out me going the manual route. ie
"..dvd/1994/940602.htm"

Also how do i change the "_parent" to "main" so all the links open in
the main window, and not just a new page.

When i have the page saved as html, i can go in find and replace in
wordpad which easily changes the links (searched on "target = "_parent"
and changed to .htm" target ="main")

How is this possible in excel, why cant i open excel in a text editor,
excelpipe doesnt help. Any other help is appreciated,


------------------------------------------------



~~Now Available: Financial Statements.xls, a step by step guide to
creating financial statements
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top