Re: Setting the Transition Function for two columns

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi

Try the below. Right click the sheet>View Code and paste the code. The two
column range is set as Col A and B . Adjust as required; try and feedback


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


"LandySandy" wrote:

Thanks for the tip. This works well. Do you know if I can create a macro that
does this behind the scenes. My end user would like to always use Column A
and B for entry.
"AltaEgo" wrote:

Highlight the range in which you want to restrict the cursor between columns
(example, click columns B & C, ensuring you click column B first).

Each time you type a value in the formula box, click [Tab]. [Enter] will
perform a different action, depending on your setup. When done, click
outside the highlighted range or press an arrow key.

If you need to start in a partially fill column, click on the left-hand
column where you wish to start, navigate to a reasonable number or rows
below and click the cell while holding the left mouse key to highlight the
range.

--
Steve

"LandySandy" <LandySandy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:29EAB714-ADF7-4EED-8B59-FE091CA64264@xxxxxxxxxxxxxxxx
I have a spreadsheet where numbers are entered in two columns. I want the
cursor to move to the right from column 1 and then after entry in column 2
I
want the cursor to move down one row and back to column 1. Does anyone
know
how to do this?
Stumped


.



Relevant Pages

  • Re: Setting the Transition Function for two columns
    ... and B for entry. ... outside the highlighted range or press an arrow key. ... want the cursor to move down one row and back to column 1. ...
    (microsoft.public.excel.programming)
  • Re: Setting the Transition Function for two columns
    ... Tab key will move from A to B then back to A one row down. ... and B for entry. ... outside the highlighted range or press an arrow key. ... want the cursor to move down one row and back to column 1. ...
    (microsoft.public.excel.programming)
  • Re: cursor doesnt appear in text entry field
    ... Jaz ... > began to happen on both of my computers I installed a Windows Update. ... The cursor longer automatically appears in the text entry ...
    (microsoft.public.windowsxp.general)
  • Re: How To Remove Certain Suggested E-Mail Addresses When Composing New Mail
    ... Remove individual addresses from the autocompletion cache by highlighting ... the entry when presented in the suggested names list (use your arrow key to ... > completely turn off the "Suggest Names" feature. ...
    (microsoft.public.outlook.general)
  • Re: Using DAO to move to the new record
    ... If an entry has been started, ... AFAIK, there is no way to make a form go to the new record if it does not ... "John S. Ford, ... > I'm trying to write some code that will move the cursor to the new record. ...
    (microsoft.public.access.forms)