Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default automatically go to a cell (excel)

For example, if cell a1 = b100, I would like to be able to double click on A1
and automatically go to cell b100.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default automatically go to a cell (excel)

right click sheet tabview codeinsert this. Now if b100 is typed into the
active cell and you double click you will go there.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Range(Target).Select
End Sub


--
Don Guillett
SalesAid Software

"chbelair" wrote in message
...
For example, if cell a1 = b100, I would like to be able to double click on
A1
and automatically go to cell b100.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default automatically go to a cell (excel)

You mean if the value of A1 is same as value of B100 or if A1 contains the
formula =B100 ?

If the latter, go to ToolsOptionsEdit and uncheck "edit directly in cell"

If the former you would need doubleclick event code.

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)
On Error GoTo enditall
Application.EnableEvents = False
If Not Intersect(Target, Range("A1")) Is Nothing Then
If Target.Value = Range("B100").Value Then
Range("B100").Select
End If
End If
enditall:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code"

Copy/paste the above into that sheet module.


Gord Dibben MS Excel MVP

On Tue, 27 Feb 2007 13:58:45 -0800, chbelair
wrote:

For example, if cell a1 = b100, I would like to be able to double click on A1
and automatically go to cell b100.


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
Can Excel headers automatically look to a cell for data? &[B2] bailey Excel Worksheet Functions 1 January 7th 07 10:10 PM
How do I set excel to automatically advance to the next cell? Carll1058 Excel Discussion (Misc queries) 1 April 8th 06 08:50 AM
How do I automatically fill a cell based on another cell in Excel SouthCarolina Excel Discussion (Misc queries) 3 January 13th 06 12:52 AM
Automatically date cell in Excel BGS Excel Worksheet Functions 2 September 2nd 05 05:37 PM
How I show, automatically, the tab name on a cell, in Excel? CPortilloTroconis Excel Worksheet Functions 4 February 24th 05 06:36 PM


All times are GMT +1. The time now is 07:52 AM.

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

About Us

"It's about Microsoft Excel"