Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jijy
 
Posts: n/a
Default Hyperlink - copying


In Sheet1, cell A1 has the formula=Sheet2!B3. Cell A1 (Sheet1) also
contains a hyperlink that is linked to Sheet2!B3

Now what I want to do is to copy the formula & the hyperlink in
sheet1A1 down to cell A2 and all the way to cell A250.

The issue is when I do the copy, the formula is copied but the
hyperlink still points to Sheet2!B3.

Any thoughts or ideas?

Thanks a lot.

Jijy


--
jijy
------------------------------------------------------------------------
jijy's Profile: http://www.excelforum.com/member.php...o&userid=15042
View this thread: http://www.excelforum.com/showthread...hreadid=553894

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JLatham
 
Posts: n/a
Default Hyperlink - copying

Insert this code into a code module, then select all the cells. While
they're still selected, use Tools | Macro | Macros to choose and run the code.

Sub CreateInternalDocumentHyperlink()

Dim Cell As Object

For Each Cell In Selection

ActiveSheet.Hyperlinks.Add Anchor:=Selection, _
Address:="", _
SubAddress:=Right$(Cell.Formula, Len(Cell.Formula) - 1)

Next

End Sub

"jijy" wrote:


In Sheet1, cell A1 has the formula=Sheet2!B3. Cell A1 (Sheet1) also
contains a hyperlink that is linked to Sheet2!B3

Now what I want to do is to copy the formula & the hyperlink in
sheet1A1 down to cell A2 and all the way to cell A250.

The issue is when I do the copy, the formula is copied but the
hyperlink still points to Sheet2!B3.

Any thoughts or ideas?

Thanks a lot.

Jijy


--
jijy
------------------------------------------------------------------------
jijy's Profile: http://www.excelforum.com/member.php...o&userid=15042
View this thread: http://www.excelforum.com/showthread...hreadid=553894


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jijy
 
Posts: n/a
Default Hyperlink - copying


The code creates the link but when I click on the link it doesn't take
me to the destination cell. Irrespective of which cell I click the
link, it will take me to one particular cell in Sheet2.
Is it possible to click on a cell and then the link takes you to the
exact cell where the item appears in Sheet2?

Thanks a lot for helping out.


--
jijy
------------------------------------------------------------------------
jijy's Profile: http://www.excelforum.com/member.php...o&userid=15042
View this thread: http://www.excelforum.com/showthread...hreadid=553894

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JLatham
 
Posts: n/a
Default Hyperlink - copying

It should take you there. Let's say that the formula in a cell is
=Sheet2!B99 then the link will be set up as Address:="", SubAddress:=
"Sheet2!B99"

I just double checked this in Excel 2003 here and it works properly and
takes me to the correct cell on the other worksheet. Perhaps check the
formulas in the cells that you're working with and make sure that somehow
they didn't all end up pointing to just one place in the workbook?

"jijy" wrote:


The code creates the link but when I click on the link it doesn't take
me to the destination cell. Irrespective of which cell I click the
link, it will take me to one particular cell in Sheet2.
Is it possible to click on a cell and then the link takes you to the
exact cell where the item appears in Sheet2?

Thanks a lot for helping out.


--
jijy
------------------------------------------------------------------------
jijy's Profile: http://www.excelforum.com/member.php...o&userid=15042
View this thread: http://www.excelforum.com/showthread...hreadid=553894


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sort excel spreadsheet with hyperlink jannkatt Excel Discussion (Misc queries) 0 June 13th 06 01:39 PM
answer to odd results when comparing hyperlink addresses Patricia Shannon Links and Linking in Excel 0 March 9th 06 07:28 PM
copying a cell that has a hyperlink Thomson health care Excel Discussion (Misc queries) 3 September 29th 05 08:10 PM
Using the Hyperlink Function and finding filenames Jeni Q Excel Worksheet Functions 0 September 20th 05 02:37 PM
Removing hyperlink Frank Marousek Excel Discussion (Misc queries) 3 January 12th 05 09:53 PM


All times are GMT +1. The time now is 02:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"