View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default using the enter to skip colums

I think you would probably have to protect the sheet and then unlock those
particular ranges that you want the cursor to move to usint Tab.

"Steved" wrote:

Hello from Steved

I have a spreadsheet that has hidden Columns

I have 4 Columns C: E: I: K: That I enter Data in on the same row.

Right is the Direction when I hit the enter key.

When it reaches Col K: and I enter data and use the enter key it drops down
a row to start at Col C: as per

I also have Column G: showing

The objective is Type data in Col C: use enter key to take me to the next
Cell in this
case Col E: "now when I push the enter key after I typed in data I want it
to skip a Column and goto Col I:" as instructed Range("C" & n).Select.

I could for example have Col A:, Col B:, Col C:, Col D:, and Col E:
Using the above I want the cursor to skip Col C: and goto Col D:

Using the below code you kindly supplied where would I put it please.

Dim Right as Boolean

Right = TRUE

I Thankyou.








"Barb Reinhardt" wrote:

Two questions:

What exactly are you trying to accomplish? It appears that cells are
sequentially selected and nothing else is done.

Do you define "down" somewhere?

Dim Down as Boolean

Down = TRUE

??
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"Steved" wrote:

Hello from Steved

Please how can I add a piece of code to below that will allow me to do 2
data entries skip a column then carry on inputing until I reach the last
Colum which is K:\

I thankyou for looking at my issue.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("K:K")) Is Nothing Then
Exit Sub
End If
If down Then
Target.Offset(1, 0).Select
Else
n = Target.Row + 1
Range("C" & n).Select
End If
down = Not down
End Sub