Is this even possible with VBA?

P

pixelpounder

Hi All,

I have a spreadsheet that requires user input
in rows for various criteria and produces a report based on that
information.
The first cell in column D (D8) contains a value that I would like to
use to allow information to be entered in that row.

Example D8=6
Data can be entered in the next 6 cells in that row, after the 6th
data is entered the cell focus is automatically changed to D9 and the
process starts all over again for row 9.
the cell value of D9 is used to allow the cell data to be entered
until that value is reached then back to the next row D10.

Any help you can give would be greatly appreciated!

Thanks,
B
 
D

Dave D-C

' This may be a start: to enter data in columns 2-4,
' after column 4, this will go to next row, column 2.
' D-C Dave
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Column = 5 Then
Cells(Target.Row + 1, 2).Select
End If
End Sub
 
P

pixelpounder

' This may be a start: to enter data in columns 2-4,
' after column 4, this will go to next row, column 2.
' D-C Dave
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Column = 5 Then
Cells(Target.Row + 1, 2).Select
End If
End Sub

Thanks for the leg up Dave,
Now I just got to get it to work with variaibles. And you know what
mom always says,
eat your variables! :)

Thanks again,
B
 

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