Thread: BIG question
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
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..................