Macro - specific range

P

puiuluipui

Hi, i have a database, and the data begins from "B5". I need to go from cell
to cell with enter, but after "F5" i need the selected cell to be "B6". I
need the data to be entered with enter key just from "B" to "F" and to go
back to next row from second cell. I need to be able to write something in
other cells, but only if i select the cell with my mouse or with the arrow
keys. On enter to go from "B" to "F":

Ex:
A B C..............F G
datas datas datas
datas datas datas

Can this be done?
Thanks!
 
J

Jacob Skaria

From Tools|Options in 2003 and in 2007 from Excel Options| 'Advanced' select
the 'direction' as 'Right' under 'After pressing Enter, move selection'.

Select the range B2:F10. The active cell will be B2. With the selection
start entering values. After F2 the active cell will be B3.

If you are really looking for a macro let us know..

If this post helps click Yes
 
J

Jacob Skaria

Try the below macro. Right click on the sheet tab. View code. Paste the below
macro..

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 6 Then
Cells(Target.Row + 1, "B").Select
ElseIf Target.Column > 1 And Target.Column < 6 Then
Cells(Target.Row, Target.Column + 1).Select
End If
End Sub

If this post helps click Yes
 

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