![]() |
![]() |
|
|||||||
| 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
Posts: 2
|
I have a document list on one worksheet which are hyperlinked. (150 docs)
I have another worksheet using formula to extract these documents into a shorter list but the hyperlink is not brought across, only the text. Is there a piece of code,formula or format command to make the hyperlink copy across. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Denver, Colorado USA
Posts: 4,014
|
Hi Jonnyw74,
Hyperlinks cannot be set by formulas or worksheet functions. There is a HYPERLINK worksheet function that enables following a hyperlink, but I do not believe this is what you want. Fortunately, it is quite easy to copy hyperlinks in VBA. The following line of code will copy a hyperlink from one cell to another. In this case from cell B4 on Sheet1 to cell A2 on Sheet2. Sheet2.Hyperlinks.Add Sheet2.[a2], Sheet1.[b4].Hyperlinks(1).Address If this example is not specific enough to your problem feel free to follow up.
__________________
Keep Excelling. Damon VBAexpert Excel Consulting (My other life: http://damonostrander.com ) |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|