Copying a range two columns wide and pasting in next free column

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
2,388
Hi Everyone,

Heres my problem,
I need a macro to do the following.

Copy Range AX53:AY68

Then paste to the first empty column row 53 after BK
So First Column it could past into is BL53 if that already contains data move on to BM and paste in first empty cell

Please help if you can thanks

Tony
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
33,894
Office Version
365
Platform
Windows
How about
Code:
Sub tonywatson()
   Dim NxtCol As Long
   NxtCol Cells(53, Columns.Count).End(xlToLeft).Offset(, 1).Column
   If NxtCol < 63 Then NxtCol = 63
   Range("AX53:AY68").Copy Cells(53, NxtCol)
End Sub
 
Last edited:

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
2,388
Hi Fluff,
I like the idea one problem
After Column CD I have other data so is there a way to stop it for looking past column CC?
this will always be enought room to find an empty space.

Thanks

Tony
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
33,894
Office Version
365
Platform
Windows
How about
Code:
Sub tonywatson()
   Dim NxtCol As Long
   NxtCol Cells(53, 82).End(xlToLeft).Offset(, 1).Column
   If NxtCol < 63 Then NxtCol = 63
   Range("AX53:AY68").Copy Cells(53, NxtCol)
End Sub
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
33,894
Office Version
365
Platform
Windows
Glad to help & thanks for the feedback
 

Forum statistics

Threads
1,085,905
Messages
5,386,697
Members
402,011
Latest member
yousraemara

Some videos you may like

This Week's Hot Topics

Top