automated cursor movement

willie conga

New Member
Joined
Mar 13, 2002
Messages
1
want cursor to go automaticly to top of the next column. 6 colums 10 rows. a10 or b10 data entered then it will go to c1...
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
You'll need to write some VBA code for this.
Select Tools - Macro - Visual Basic Editor
Make sure the Project Explorer is visible on the left (otherwise View - Project Explorer)
In the Project Explorer, Open folder Microsoft Excel Objects under the workbook and double click on the sheet you want to behave as you described. A VBA window opens on the right side.
In this window, select "Worksheet" in the left pulldown (on top, saying (General)) and select Change in the right pulldown.
A "skeleton subroutine" appears in the window that looks like this:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
End Sub

Now add the following code line between the two lines of code just mentioned:
If Target.Row = 10 Then Target.Offset(-9, 1).Select

Now go back to you excel sheet and try it out.

Marc
 
Upvote 0

Forum statistics

Threads
1,213,556
Messages
6,114,284
Members
448,562
Latest member
Flashbond

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top