is it possible to jump to the souce of link in sheet with mosue click??

  • Thread starter Thread starter John Wirt
  • Start date Start date
J

John Wirt

Is it possible to jumpt to the source of a linked cell
with a mouse click or in some simple way?

Suppose cell E2 in Sheet1 has this link in it:

='Sheet2!G6

I would like to click on cell E2 and be taken to cell G6
in a flash.

Thanks.

John Wirt
 
John

I have some code you can use below (I assume you are familiar with Visual Basic). It uses the "Precedent" property of cells, which returns the range of all the precedent cells. The unfortunate part of what I wrote is that it uses the "SheetSelectionChange" event, so it will always select the cell's precedents when you click on any cell (ie you can't actually get into the cell any more). I think you would want to come up with something more sophisticated - maybe make a button like the "Paste Format" button that lets you select it, and then the code is activated for the next cell you select. Also, it only works with cells in the active sheet. To get to other sheets or workbooks, you'd have to fiddle with it to get that information out of the precedent range. I hope this helps you along though!

Eri

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range

On Error Resume Next ' so that nothing happens if there are no precedent

ActiveCell.DirectPrecedents.Selec

End Su
 
John,

In Excel 2002, this can be done by simply double-clicking
on the cell.

Regards,
Ryan
 
Searching Google Newsgroups, I have found that this can be done in Excel
2000 also by going to

Tools|Options|Edit and unchecking "Edit directly in cell"

Also selecting the cell with Ctrl / [ works.

John Wirt
 
Back
Top