A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

BIG question



 
 
Thread Tools Display Modes
  #1  
Old June 14th, 2009, 01:15 AM posted to microsoft.public.excel.misc
Wu
external usenet poster
 
Posts: 41
Default BIG question

I would like to write a marco that:

Let me input data in a cell, and when I [ENTER], the cursor will move to
right cell to let me input data again..................
  #2  
Old June 14th, 2009, 01:21 AM posted to microsoft.public.excel.misc
Max
external usenet poster
 
Posts: 8,574
Default BIG question

Think you can just change the setting to suit ..
Click Tools Options Edit tab
Select as desired from the droplist for "Move selection after Enter",
ie select: Right, then OK out

Voila? Express it, click the YES button below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"Wu" wrote:
I would like to write a marco that:

Let me input data in a cell, and when I [ENTER], the cursor will move to
right cell to let me input data again..................

  #3  
Old June 14th, 2009, 01:31 AM posted to microsoft.public.excel.misc
Wu
external usenet poster
 
Posts: 41
Default BIG question

I need not only move the cursor to right after inputing data.

How to write the marco to specifiy where the cursor to move after input data



"Wu" wrote:

I would like to write a marco that:

Let me input data in a cell, and when I [ENTER], the cursor will move to
right cell to let me input data again..................

  #4  
Old June 14th, 2009, 01:33 AM posted to microsoft.public.excel.misc
Wu
external usenet poster
 
Posts: 41
Default BIG question


But I need not only move to right.

How to write the marco to move to specified direction after [ENTER], such as
move down , move up...............



"Max" wrote:

Think you can just change the setting to suit ..
Click Tools Options Edit tab
Select as desired from the droplist for "Move selection after Enter",
ie select: Right, then OK out

Voila? Express it, click the YES button below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"Wu" wrote:
I would like to write a marco that:

Let me input data in a cell, and when I [ENTER], the cursor will move to
right cell to let me input data again..................

  #5  
Old June 14th, 2009, 02:08 AM posted to microsoft.public.excel.misc
RagDyeR
external usenet poster
 
Posts: 3,482
Default BIG question

This is one way *without* using a macro:

http://tinyurl.com/2gzlwp

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Wu" wrote in message
...
I need not only move the cursor to right after inputing data.

How to write the marco to specifiy where the cursor to move after input

data



"Wu" wrote:

I would like to write a marco that:

Let me input data in a cell, and when I [ENTER], the cursor will move

to
right cell to let me input data again..................


  #6  
Old June 14th, 2009, 06:00 AM posted to microsoft.public.excel.misc
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default BIG question

Hi

If you are looking for a macro. Right click the sheetView Code and paste
the code. The below macro works in the range Col A:B . Move to right from A
to B and then again get back to A...next row..In the below code lngRow and
lngCol determine the next cell . Target.Row is the current row and
Target.Column is the current column. Adjust to suit...


Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngTemp As Range
Dim lngCol As Long, lngRow As Long
Set rngTemp = Range("A:B")
Application.EnableEvents = False
If Not Application.Intersect(Target, rngTemp) Is Nothing Then
lngCol = IIf(Target.Column = rngTemp.Column, _
Target.Column + 1, rngTemp.Column)
lngRow = IIf(Target.Column = rngTemp.Column, _
Target.Row, Target.Row + 1)
Cells(lngRow, lngCol).Select
End If
Application.EnableEvents = True
End Sub


If this post helps click Yes
---------------
Jacob Skaria


"Wu" wrote:

I would like to write a marco that:

Let me input data in a cell, and when I [ENTER], the cursor will move to
right cell to let me input data again..................

  #7  
Old June 14th, 2009, 05:49 PM posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
 
Posts: 20,252
Default BIG question

Private Sub Worksheet_Change(ByVal Target As Range)
'Anne Troy's taborder event code
Dim aTabOrd As Variant
Dim i As Long

'Set the tab order of input cells
aTabOrd = Array("A5", "B22", "C5", "A11", "D10", "F7")

'Loop through the array of cell address
For i = LBound(aTabOrd) To UBound(aTabOrd)
'If the cell that's changed is in the array
If aTabOrd(i) = Target.Address(0, 0) Then
'If the cell that's changed is the last in the array
If i = UBound(aTabOrd) Then
'Select first cell in the array
Me.Range(aTabOrd(LBound(aTabOrd))).Select
Else
'Select next cell in the array
Me.Range(aTabOrd(i + 1)).Select
End If
End If
Next i

End Sub


Gord Dibben MS Excel MVP

On Sat, 13 Jun 2009 17:33:01 -0700, Wu wrote:


But I need not only move to right.

How to write the marco to move to specified direction after [ENTER], such as
move down , move up...............



"Max" wrote:

Think you can just change the setting to suit ..
Click Tools Options Edit tab
Select as desired from the droplist for "Move selection after Enter",
ie select: Right, then OK out

Voila? Express it, click the YES button below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"Wu" wrote:
I would like to write a marco that:

Let me input data in a cell, and when I [ENTER], the cursor will move to
right cell to let me input data again..................


  #8  
Old June 14th, 2009, 06:10 PM posted to microsoft.public.excel.misc
Dave
external usenet poster
 
Posts: 2,331
Default BIG question

Hi Wu,
If you have a number of cells dotted over your sheet that require data, you
could use the following:
Unlock only the cells you want to enter data into.
Protect the sheet; no need for a password.
Now hit the TAB key.
Successive hits on the TAB key will select each cell you unlocked.
So after data entry, hit TAB instead of enter.

"Wu" wrote:

I would like to write a marco that:

Let me input data in a cell, and when I [ENTER], the cursor will move to
right cell to let me input data again..................

  #9  
Old June 14th, 2009, 08:18 PM posted to microsoft.public.excel.misc
Shane Devenshire[_3_]
external usenet poster
 
Posts: 3,333
Default BIG question

Hi,

Press Tab instead of Enter to move to the Right
Press Shift+Tab instead of Enter to move to the Left
Press Shift+Enter instead of Enter to move Up

However, if you use the cursor keys instead of Enter you also move in the
appropriate direction - Left, Right, Up or Down arrows keys

All of these enter the data as the move the cursor.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Wu" wrote:

I would like to write a marco that:

Let me input data in a cell, and when I [ENTER], the cursor will move to
right cell to let me input data again..................

  #10  
Old June 14th, 2009, 08:23 PM posted to microsoft.public.excel.misc
Rick Rothstein[_2_]
external usenet poster
 
Posts: 2,013
Default BIG question

I believe this shorter code will function identically to the code you
posted...

Private Sub Worksheet_Change(ByVal Target As Range)
' Set the tab order of input cells in a space delimited list
Const aTabOrd As String = "A5 B22 C5 A11 D10 F7"
On Error Resume Next
Range(Trim(Split(Split(aTabOrd & " " & aTabOrd, Target.Address(0, 0) _
& " ", , vbTextCompare)(1))(0))).Select
End Sub

--
Rick (MVP - Excel)


"Gord Dibben" gorddibbATshawDOTca wrote in message
...
Private Sub Worksheet_Change(ByVal Target As Range)
'Anne Troy's taborder event code
Dim aTabOrd As Variant
Dim i As Long

'Set the tab order of input cells
aTabOrd = Array("A5", "B22", "C5", "A11", "D10", "F7")

'Loop through the array of cell address
For i = LBound(aTabOrd) To UBound(aTabOrd)
'If the cell that's changed is in the array
If aTabOrd(i) = Target.Address(0, 0) Then
'If the cell that's changed is the last in the array
If i = UBound(aTabOrd) Then
'Select first cell in the array
Me.Range(aTabOrd(LBound(aTabOrd))).Select
Else
'Select next cell in the array
Me.Range(aTabOrd(i + 1)).Select
End If
End If
Next i

End Sub


Gord Dibben MS Excel MVP

On Sat, 13 Jun 2009 17:33:01 -0700, Wu
wrote:


But I need not only move to right.

How to write the marco to move to specified direction after [ENTER], such
as
move down , move up...............



"Max" wrote:

Think you can just change the setting to suit ..
Click Tools Options Edit tab
Select as desired from the droplist for "Move selection after Enter",
ie select: Right, then OK out

Voila? Express it, click the YES button below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"Wu" wrote:
I would like to write a marco that:

Let me input data in a cell, and when I [ENTER], the cursor will move
to
right cell to let me input data again..................



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:42 PM.


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