move to next cell

excellence

Board Regular
Joined
Oct 5, 2005
Messages
133
Office Version
  1. 365
Platform
  1. MacOS
Hi,
It's been a while and apologize in advance if I am not obeying the rules, but haven't done vba or macros for a while and never was any good at it but here goes:
I am looking to be able to automate the following:
I have a protected worksheet where the involved cells are g3:k8 where I would like to have the 1st active cell as g3 and offset 1 cell at a time to g8.
It would then go to g4:g8...then to g5 same thing,g6 same,g7 and g8 same. For what it's worth, I have some data validation in each cell, which would limit the user to enter just 1 character. So, if e.g GG was entered and dialog box would come up to tell user only 1 character allowed and user could retry to meet the 1 character limit.

If you choose to rsvp, please be real basic, as I am in preschool with this. Also, on a Mac using the latest office
 
All you have to do is to paste the script in Sheet1's module (before or under any other macro if already there). Then, when you move from Sheet1 to Sheet2 and back, you will find in Sheet1 the cursor in cell G3.
If you have no reason to move to Sheet2 and back but would be okay to go to cell G3 when opening the file you could use this other script to be pasted in ThisWorkbook module:
VBA Code:
Private Sub Workbook_Open()
    Worksheets("Sheet1").Select
    Range("G3").Select
End Sub
elsewise please attach an example of your file.
 
Upvote 0

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,215,053
Messages
6,122,888
Members
449,097
Latest member
dbomb1414

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