Select and copy Multiple Column at the same time and past.

Gwhaou

Board Regular
Joined
May 10, 2022
Messages
78
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Hello, I need some help, I want to know if it's possible to select mutiple columns from one row until down : for exemple select A5, B5, C5 until down and copy to paste it on a other sheet.

For the moment I use this type of code which move between sheets column by column 🤕 :

VBA Code:
Public CopyPaste()

Call Supp_Arr

Sheets("Original_Sheet").Select


   
   
    Range("A5").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    Sheets("Paste_Sheet").Select
    Range("A5").Select
    ActiveSheet.Paste
   
 
Sheets("Original_Sheet").Select

   
    Range("B5").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    Sheets("Paste_Sheet").Select
    Range("B5").Select
    ActiveSheet.Paste
   
Sheets("Original_Sheet").Select

   
    Range("C5").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    Sheets("Paste_Sheet").Select
    Range("C5").Select
    ActiveSheet.Paste
   
Sheets("Original_Sheet").Select

   
    Range("D5").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    Sheets("Paste_Sheet").Select
    Range("D5").Select
    ActiveSheet.Paste

Sheets("Original_Sheet").Select

   
End Sub

I'm trying to improv my skills on VBA, that why I want to know if it's possible to select A5,B5,C5,D5 until down in one line and copy that to paste it on the Paste_Sheet.

🙏
 
Last edited:

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hello GWH,

You could try something like this as an example:-

VBA Code:
Sub GWH()

Dim lr As Long
lr = Sheets("Original_Sheet").Range("A" & Rows.Count).End(xlUp).Row

Sheets("Original_Sheet").Range("A5:D" & lr).Copy Sheets("Paste_Sheet").Range("A" & Rows.Count).End(3)(2)

End Sub

I hope that this helps.

Cheerio,
vcoolio.
 
Upvote 0
Hello GWH,

You could try something like this as an example:-

VBA Code:
Sub GWH()

Dim lr As Long
lr = Sheets("Original_Sheet").Range("A" & Rows.Count).End(xlUp).Row

Sheets("Original_Sheet").Range("A5:D" & lr).Copy Sheets("Paste_Sheet").Range("A" & Rows.Count).End(3)(2)

End Sub

I hope that this helps.

Cheerio,
vcoolio.
Yes I'm gonna try that, thks
 
Upvote 0
I got a little problem de Paste_Sheet is available from row 5, is possible to paste from A5 on that ?

VBA Code:
Sub GWH()

Dim lr As Long
lr = Sheets("Original_Sheet").Range("A" & Rows.Count).End(xlUp).Row

Sheets("Original_Sheet").Range("A5:D" & lr).Copy Sheets("Paste_Sheet").Range("A5" & Rows.Count).End(3)(2)

End Sub

I modify that but i think it's not the correct form
 
Upvote 0
Hello GWH,

Change this line:-

VBA Code:
Sheets("Original_Sheet").Range("A5:D" & lr).Copy Sheets("Paste_Sheet").Range("A" & Rows.Count).End(3)(2)

to


VBA Code:
Sheets("Original_Sheet").Range("A5:D" & lr).Copy Sheets("Paste_Sheet").Range("A5")

Cheerio,
vcoolio.
 
Upvote 0
Solution
Hello GWH,

Change this line:-

VBA Code:
Sheets("Original_Sheet").Range("A5:D" & lr).Copy Sheets("Paste_Sheet").Range("A" & Rows.Count).End(3)(2)

to


VBA Code:
Sheets("Original_Sheet").Range("A5:D" & lr).Copy Sheets("Paste_Sheet").Range("A5")

Cheerio,
vcoolio.
Tks that's work's for me đź‘Ś
 
Upvote 0
You're welcome GWH. I'm glad that I was able to assist. Thanks for the feed back.

Cheerio,
vcoolio.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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