![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Location: Andre'
Posts: 3
|
I have inherited a very large Excel project that has some columns full of hyperlinks to websites. The problem is they are NOT clickable. They are just text. Aside from going to each cell and putting a space at the end of each link and hitting enter to make it linkable. Is there a way to globally throughout the entire worksheet take any cell that has data beginning with http:// and make a true hyperlink?
Thanks for your time and help, |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
In D2 enter: =HYPERLINK(C2) and double click on the fill handle in the lowr right corner of D2 in order to copy down the formula. |
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Denver, Colorado USA
Posts: 4,014
|
Hi Andre,
Here's a macro that does this. Sub TextToHyperlink() Dim Cell As Range Dim Hlink As String For Each Cell In ActiveSheet.UsedRange If UCase(Left(Cell, 7)) = "HTTP://" Or _ UCase(Left(Cell, Hlink = Cell.Value Cell.ClearContents ActiveSheet.Hyperlinks.Add Cell, Hlink End If Next Cell End Sub
__________________
Keep Excelling. Damon VBAexpert Excel Consulting (My other life: http://damonostrander.com ) |
|
|
|
|
|
#4 |
|
New Member
Join Date: Apr 2002
Location: Andre'
Posts: 3
|
Damon,
Consider that you're not dealing with Excel experts here... For some reason the macro is coming up with a syntax error. Any ideas....or a more detailed explanation. If it helps the data we are trying to convert to hyperlink in this case is ALL in column F. Thanks... Andre' |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Apr 2002
Location: Cape Town,South Africa
Posts: 234
|
Here's what you do to link all hyperlinks my good friend :..........
Highlight ranges that you want to link >>goto>>insert>>hyperlink>> |
|
|
|
|
|
#6 |
|
New Member
Join Date: Apr 2002
Location: Andre'
Posts: 3
|
Thanks Gareth..
This would be great if all the links were to the same link but these are not. Thanks anyways.. Andre' |
|
|
|
|
|
#7 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Denver, Colorado USA
Posts: 4,014
|
Hi again Andre,
The only syntax problem I can see is that, for some reason the "7)" got converted to a smiley face. It should look like the line just above.
__________________
Keep Excelling. Damon VBAexpert Excel Consulting (My other life: http://damonostrander.com ) |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|