using the enter to skip colums

S

Steved

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
 
B

Barb Reinhardt

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

??
 
S

Steved

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.
 
B

Barb Reinhardt

How do you determine which columns to skip. It's not clear to me. Do you
want to skip the hidden columns?

Later you say you want to enter something in Column E and then go to Col I.
Here you're skipping 3 columns.

Later you say you could have Col A through E and you want to cursor to skip
col C and go to D. It seems random to me. How do we know which columns to
skip?

Barb Reinhardt
 
J

JLGWhiz

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.
 
S

Steved

Hellom from Steved

Later you say you want to enter something in Column E and then go to Col I.
Here you're skipping 3 columns.

Interesting issue I've started, In the above Col F and and Col H are hidden.
In my thinking If I use the enter key twice as Col f and Col H are hidden it
goes to Col I that's the rational behind my thinking. I thought a code would
do it for me as sometimes I've more than a hundred rows to do.

So in finishing the code will not ignore hidden columns.

I thankyou for your timeout on my issue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top