Going to certain cell address

K

Khalil Handal

Hi,
Maybe I was not clear in my previouse posting dated 17/1/07 @ 10:45PM.
What I ment is:
if C1=1 need to go to cell address a8
if c1=2 need to go to cell address a68
.......
......
and so on

In other words:
If i entered the value of 2 in cell c1 and press enter key I want to go to
the cell addresss A68

Hope that I made myself more clear.

Khalil
 
J

Joerg

A small macro would do the trick. Adapt as needed and put it into the code
page of "ThisWorkbook"

Cheers,
Joerg Mochikun


Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If ActiveCell = [c1] Then
Select Case ActiveCell.Value
Case 1
[a8].Select
Case 2
[a68].Select
End Select
End If
End Sub
 
T

Trevor Shuttleworth

Maybe something like:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B1")) Is Nothing Then Exit Sub
Range("A" & 8 + (Target.Value - 1) * 60).Select
End Sub

Regards

Trevor
 
B

Bob Phillips

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C1")) Is Nothing Then
If IsNumeric(Target.Value) Then
Application.Goto Me.Range("A" & 8 + (Target.Value - 1) * 60)
End If
End If
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
P

Pete_UK

Here's another approach which doesn't involve VBA. Enter this formula
in D1:

=IF(AND(C1>0,C1<=12),HYPERLINK("#"&"A"&((C1-1)*60+8),"Jump"),"")

Now put a value between 1 and 12 in C1 and the word "Jump" will appear
in D1 - click on this cell and it will take you to the appropriate
cell, C8, C68, C128 etc.

Hope this helps.

Pete
 
K

Khalil Handal

Thanks to all of you for the great help.
I think I will use Pete's way.
Khalil
 
Top