Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hyperlinks Don't Sort

11 views
Skip to first unread message

Dan Raab

unread,
Dec 6, 2005, 5:00:57 PM12/6/05
to

When sorting, hyperlinks refer back to the original absolute cell
position, not to there the sorted data ends up, i.e. the hyperlink
points to a static location, not to the data it was originally pointed
to. Need to have hyperlinks follow the data around when sorting.

I have tried hyperlinking to range names, that fix allows row and
column inserts and deletions, but does not track when sorting.

Have also tried the =HYPERLINK("#"&CELL("address",C5),C5) fix. Same
results as range names, allows row and column inserts and deletions but
does not track when sorting.

Thanks,

Dan


--
Dan Raab
------------------------------------------------------------------------
Dan Raab's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=29414
View this thread: http://www.excelforum.com/showthread.php?threadid=491237

David McRitchie

unread,
Dec 6, 2005, 6:58:36 PM12/6/05
to
Are you trying to sort the displayed content or the hyperlink itself.
Are you selecting all cells on the worksheet before invoking sort.
http://www.mvps.org/dmcritchie/excel/sorting.htm
In Excel 2003 Ctrl+A does NOT select all cells but they did not manage to
mess up a more obscure one Ctrl+Shift+SpaceBar which like
Ctrl+A (double use in Excel 2003) does not change the active cell.

If you type
www.abc.com into a cell it generates object type hyperlink to http://www.abc.com
if then type in the following into the cell
=HYPERLINK("http://www.nbc.com","nbc")
you still have the underlying link to abc.com and you will go to abc.com when
you click on the link. You can check the active cell with Ctrl+K

Give me an example of 3 cells with hyperlink, how you create them
how you sort them. How you know it failed.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Dan Raab" <Dan.Raab.1zn2mn...@excelforum-nospam.com> wrote in message
news:Dan.Raab.1zn2mn...@excelforum-nospam.com...

Dan Raab

unread,
Dec 7, 2005, 1:19:02 PM12/7/05
to

Thanks for the help!

In cell C2 enter some text, "Target".
In Cell C3 enter some text, "Link to Target".
Right click on C3, hyperlink, enter the cell reference C2.
Hyperlink works correctly.
Place cursor in row 1 and insert a row.
Hyperlink takes you to C2, not to the target.

There are two fixes to this problem. use the
=HYPERLINK("#"&CELL("address",C5),C5) fix, which I found on line. Or,
you can also name the cell C2 with a range name and hyperlink to the
defined name.

OK, so now we can insert and delete rows and columns, but we still
cannot sort.


New spreadsheet
Cell C2 has text "Target"
Cell C2 has a range name, say "a"
Cell C3 has text "Link to Target" and is hyperlinked to the defined
name, "a"
Cell D2 has number 7
Cell D3 has number 3
Cell D4 has number 1
Cell D5 has number 4
Select the entire rows for rows 2,3,4,5
Data, Sort
No Row Header,
Column D, Ascending
The hyperlink now points to Cell C2, not to the Target.

I need some way to tie the hyperlinks to the actual location of the
target after a sort, whereever that location may be.

Please advise,

Thanks again!

Dan Raab

unread,
Dec 8, 2005, 5:00:52 PM12/8/05
to

Still looking for an answer. Any ideas?

Thanks!

David McRitchie

unread,
Dec 8, 2005, 6:05:19 PM12/8/05
to
Hi Dan,
Okay you can't do that. Is there another way that you can
identify the cell you are trying to link to, like perhaps with
VLOOKUP. If not its sound like something for a database
application like identify parents, children, siblings.

Or perhaps make a copy of the sheet saving as values to
another sheet and then sort that sheet.


---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Dan Raab" <Dan.Raab.1zomna...@excelforum-nospam.com> wrote in message
news:Dan.Raab.1zomna...@excelforum-nospam.com...

0 new messages