Eliminate the window movement when using =HYPERLINK() in Excel

Posted on 2011-03-22
Last Modified: 2012-05-11

This is driving me nuts!!

It seems that anytime the =HYPERLINK() function in Excel (2007) has been used to create a link to a different workbook, clicking the link not only activates the target workbook but also moves it into exactly the same location on the screen already occupied by the workbook containing the link.  This appears to be the case regardless of whether the two workbooks are opened in a single Excel instance or opened in separate instances.  

The net result of course is that any advantage gained by positioning workbooks side-by-side to view them together is lost.  In other words, any desired benefit of using hyperlinks to jump quickly and easily between two workbooks, is lost since the target workbook does not remain fixed in its original position.

I suppose there are some occasions when one would want the target to move to the same location and essentially replace the initial worksheet (the one containing the link) but it seems MS would think to make that optional rather than the way it behaves in all cases.

Any suggestions on how to eliminate the window movement when using =HYPERLINK() would be very greatly appreciated!

Question by:Steve_Brady
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

by:Jignesh Thar
ID: 35192379
Steve_Brady - I didnt know about this behavior and I see that it works exactly as you described (irrespective of same or separate instance of excel). I dont believe there would be way to change this behaviour.

You might already know that there is something called Back button that you can add in "Customize Quick Access Toolbar" so that Back button (same as in internet explorer) appears when you navigate to different place using Hyperlink. Only advantage of this is an ability to return to cell from which you clicked Hyperlink. I know that this is not what you looking for (comparing worksheets side by side).
LVL 30

Expert Comment

ID: 35192450
Steve: This is something from the Excel help file. I am not sure if this helps but thought that I'd mention it.

Excel Help
To select a cell that has a hyperlink in it without jumping to the hyperlink destination, click the cell and hold the mouse button until the cursor becomes a cross , then release the mouse button.

LVL 30

Expert Comment

ID: 35192500
Here is a snapshot.

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 42

Accepted Solution

dlmille earned 250 total points
ID: 35192528
Steve - I see the issue.  I had two worksheets ARRANGED TILED and created a simple link between the two - and it put the one on top of the other.

One potential work-around, is to have code like this:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
application.displayalerts = false
    Windows.Arrange ArrangeStyle:=xlTiled
application.displayalerts = true
End Sub

in your worksheet that has the hyperlinks.

After pulling up the workbook that the worksheet hyperlinks to, the autoarrange ensures my workbooks are side-by-side.

the arrangement of windows (if specified ahead of time) can be managed with similar code.  This was just an example that ensures the worksheets I'm working with are arranged tiled.

Are you interested in going down this path?  with some effort, it may be possible to identify where all open workbooks exist, and on the hyperlink event, ensure they revert to where they were to start with...


Assisted Solution

wellous earned 250 total points
ID: 35192848

Here is a workaround of the issue,
Don't use Hyberlink but use Macro direct to open the workbook you want.
Create a module and paste this code into it, then save ,
the Marco will work when you press CTrl+r
Hope it helps,

Sub Macro1()
' Macro1 Macro
' Macro recorded 22/3/2011 by JZRS1446
' Keyboard Shortcut: Ctrl+r
  Workbooks.Open Filename:="E:\JZRS1446\Data\Science.xls"
' change E:/xxxxxx to the location of the file you want to open.
End Sub

Expert Comment

ID: 35193004

I think it will not work if you take it copy/paste from here ..
Please follow this steps:

/ /Download the file i attached now.
/ /save on your PC .
/ /Open your (primary)Excel file which had hyberlinks.
/ /Press Alt+F11 ( to open VB editior)
/ /Go to File then Improt the my file to your excelsheet.
/ /Modify this code : Workbooks.Open Filename:="E:\JZRS1446\Data\Science.xls"
and write the location and file name you want to open.
/ /save , then goto excel workbook and press Ctrl+r
This way it will never put one sheet on top of the other in case of two worksheets are opened together..
Hope you like it :)

Author Closing Comment

ID: 35420693

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question