ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro - specific range (https://www.excelbanter.com/excel-discussion-misc-queries/230386-macro-specific-range.html)

puiuluipui

Macro - specific range
 
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!

Jacob Skaria

Macro - specific range
 
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
---------------
Jacob Skaria


"puiuluipui" wrote:

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!


Jacob Skaria

Macro - specific range
 
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
---------------
Jacob Skaria


"puiuluipui" wrote:

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!


puiuluipui

Macro - specific range
 
Hi, both solution are working!
But the macro it's the best!
Thanks allot!

"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"puiuluipui" wrote:

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!



All times are GMT +1. The time now is 07:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com