close

Hello I have a sheet which is made up of data contained in serveral other
sheets and it is gathered through VLOOKUP and HLOOKUP formulas. If I click on
the cell I can see where the data is coming from, but is it possible to have
something like a double click that takes me to the cell where the data is
entered?

,thanks in advance

If you mean you want to goto the lookup table, try this in the sheet module.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
On Error Resume Next
ms = Target.Formula
p1 = InStr(ms, quot;,quot;) 1
p2 = InStr(ms, quot;!quot;)
p3 = InStr(ms, quot;:quot;)
mysheet = Mid(ms, p1, p2 - p1)
mycell = Mid(ms, p2 1, p3 - p2 - 1)
Application.Goto Sheets(mysheet).Range(mycell)
End Sub

--
Don Guillett
SalesAid Software

quot;Edquot; gt; wrote in message
...
gt; Hello I have a sheet which is made up of data contained in serveral other
gt; sheets and it is gathered through VLOOKUP and HLOOKUP formulas. If I click
gt; on
gt; the cell I can see where the data is coming from, but is it possible to
gt; have
gt; something like a double click that takes me to the cell where the data is
gt; entered?
gt;
gt; ,thanks in advance
Hello, I tried to insert the code but the first part quot;Private Sub
Worksheet...quot; comes out in red when I paste it...

Probably word wrap due to email. Goto the end of the top line and use delete
key until the second line comes up.

--
Don Guillett
SalesAid Software

quot;Edquot; gt; wrote in message
...
gt; Hello, I tried to insert the code but the first part quot;Private Sub
gt; Worksheet...quot; comes out in red when I paste it...

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()