Moving around worksheet using macro

dhoom98

New Member
Joined
Jun 19, 2011
Messages
6
Hi,
I am looking for macro which can be used to move around the cells. For example if I want to enter data form C5:F10 which means I want to edit 6 rows down first than cursor move to Colum D5 and enter value in cell D5 to D10 than again move to E5 Colum to E10 and so on. I do not want to change direction for curser from option menu for down or left.

Macro can be take instruction from fixed cell how many columns and raw to be used for entry with sequence (down or left). Curser can be move left 5 cells then move to down or move down 5 rows than move to left
 
Last edited:

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Welcome to the board.

You don't specify what values you want to put into the cells. This macro takes the number of rows from cell A1 and then the number of columns from cell B1 and starts from cell C5:
Code:
Sub MoveMe()

Dim x as Long, y as Long

Application.ScreenUpdating = False

For x = 5 to Range("A1")
   For y = 3 to Range("B1")
      Cells(x, y) = x * y
   Next y
Next x

Application.ScreenUpdating = True

End Sub
 
Upvote 0
Measurement values I am going to enter to calculate Avg. and Std.
Data entry can be start from C5 or C15 or any row in colum C. Can I change starting cell?
 
Upvote 0
The number 5 in red below refers to starting row 5, the number 3 refers to column 3
Rich (BB code):
Sub MoveMe()

Dim x as Long, y as Long

Application.ScreenUpdating = False

For x = 5 to Range("A1")
   For y = 3 to Range("B1")
      Cells(x, y) = x * y
   Next y
Next x

Application.ScreenUpdating = True

End Sub
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,909
Members
452,949
Latest member
beartooth91

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