Thread: next cell
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John Coleman John Coleman is offline
external usenet poster
 
Posts: 274
Default next cell

Hi,

Maybe you want something like this:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static OldTarget As Range
If OldTarget Is Nothing Then
Set OldTarget = Target
Else
Select Case OldTarget.Address
Case "$C$1"
Range("D1").Select
Case "$D$1"
Range("E1").Select
Case "$E$1"
Range("C3").Select
Case "$C$3"
Range("C4").Select
Case "$C$4"
Range("C5").Select
End Select
Set OldTarget = ActiveCell
End If
End Sub


Copy this into the code module for the sheet you are interested in.
Then, pressing enter when in cell C1 will get you to D1, pressing enter
in cell E1 will get you to C3 etc. If this isn't what you are looking
for then you need to be a little more clear in your question.

HTH

-John Coleman
delmac wrote:
Hi all, I have a spreadsheet where I have to fill in the following cells one
after the other if data is entered into cell C1: they a D1, E1 then C3, C4
and C5. These are the only cells needed to be input in that order, can anyone
help me with this.
Thanks all in anticipation of your appreciated help.


--
delmac