Copy a range 1 column over

Paragons

New Member
Joined
Aug 18, 2021
Messages
9
Office Version
  1. 2013
Platform
  1. Windows
I have data in cells AD2:AG2, but each cell has unique formats.
This repeats every 20 rows (AD22:AG22) e.g. until row 1100
I would like a VBA macro to copy them and paste 1 column over...AE2:AH2 for the first row, AE22:AH22 for the next and the same formats must be retained...i.e AD2 format goes to AE2 etc.

I don't under stand how to step the procedure and capture the 4 columns at the same time.


Also, I'll have to repeat for rows 3, 23, 43 etc
Thanks,

Pete
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
If you want all formats, probably something like below

VBA Code:
Sub tst()
 For i = 3 To 1100 Step 20
    Cells(i - 1, 31).Resize(, 4).Copy
    Cells(i, 31).PasteSpecial xlPasteFormats
 Next
End Sub
 
Upvote 0
Thanks...I got mine to work but only 1 column at a time so this is better.

Pete
 
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,625
Members
449,093
Latest member
catterz66

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