Moving from one place to another depending on value in certain cell

K

Khalil Handal

Hi to everybody,
In a worksheet I need to move between certain location (cells); these cells
are:
A8, A68, A128, A188, A248, A308, A368, A428, A488, A548, A608, A668
What I want is: If I put 1 in cell B1 and press ENTER the cursor move to
cell A8 (A8 will be the active cell), If I put 3 in cell B1 and press Enter
to go cell A128 and so on with other cells from 1 to 12.

Can any one help please.
 
G

Gord Dibben

Several methods to do this.

1. Unlock just those cells and Protect the sheet.

The Tab key will move to those cells.

2. Unlock just those cells and Protect the sheet with "select locked cells"
unchecked.

The ENTER key will move to those cells.

3. No sheet protection necessary.

Start with A68 and select those cells using CTRL + click ending with A8.

Name that range.

From the namebox select your name.....A8 will be the active cell.

ENTER your way through the range.


Gord Dibben MS Excel MVP
 
K

Khalil Handal

Hi,
The first two ways will not work because I need other cells to be unlocked
(data must be entered).
The third way:
I selected the cells & gave a name, when I choose the name all the cells are
selected and not a single cell; it seems that it uses the name for all the
cells not for a singel cell.

Other suggestions??

Khalil
 
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
 
G

Gord Dibben

Third method...........

Yes, all cells are selected but A8 will be active.

When you hit ENTER you will move to A68 and through the range of selected cells
in order.


Gord
 
Top