VBA Loop

Davebro

Board Regular
Joined
Feb 22, 2018
Messages
123
Office Version
  1. 2021
  2. 2016
Platform
  1. Windows
I am still learning VBA and do not know how to make a loop for the following. This copies a cell and pastes it.

Sub Time()
'
' Macro TIme
'

'
ActiveCell.Select
Selection.Copy
ActiveCell.Offset(0, -1).Range("A1:A11").Select
ActiveSheet.Paste
ActiveCell.Offset(11, 1).Range("A1").Select
Application.CutCopyMode = False
Selection.Copy
ActiveCell.Offset(0, -1).Range("A1:A11").Select
ActiveSheet.Paste
ActiveCell.Offset(11, 1).Range("A1").Select
End Sub
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi,
Could you describe in plain English what you want to achieve ...
 
Upvote 0
Hi, I want to copy the contents of cell B2 to A2 to A11
then go to B13 and copy contents to B13 to B22
and repeat down the column.
 
Upvote 0
Just to clarify ... you mean:
Copy B2 to A2:A11
Copy B13 to A13:A22
Copy B24 to A24:A33
till the very last cell in column B ...

Is that right ?
 
Upvote 0

Forum statistics

Threads
1,215,644
Messages
6,125,992
Members
449,278
Latest member
MOMOBI

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