Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default 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!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default 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!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default 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!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default 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!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
modify a macro to apply to a specific range of cells Dave F Excel Discussion (Misc queries) 2 April 25th 07 03:00 AM
Need help - Macro to copy a specific range Dileep Chandran Excel Worksheet Functions 9 December 5th 06 09:10 AM
Need help - Macro to copy a specific range Dileep Chandran Excel Worksheet Functions 0 December 4th 06 10:24 AM
Count Specific word in specific range [email protected] Excel Worksheet Functions 2 May 16th 06 10:30 AM
Count If Specific word in specific range [email protected] Excel Discussion (Misc queries) 2 May 16th 06 10:14 AM


All times are GMT +1. The time now is 06:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"