Easy way to copy multiple columns

RichardNJ

New Member
Joined
Jun 29, 2009
Messages
7
Hello. I have been googling for a long time to find a simple answer to what I believe to be a simple question...no luck, so thought would try here.

Every month I have to download about 30 spreadsheets with several columns of info. I only need a few of the columns, so I need to copy 18 of them which are scattered throughout the whole sheet, and create a new spreadsheet with that info. It takes a very long time to do since I can only copy a few at a time then keep going back to the new sheet to paste...back and forth.

The columns I need are always the same letters, so is there some easy way to just enter in someplace the columns I need to copy them all at once?

This would seem like a simple and common thing to do that would save a ton of time, but I can't find an answer anywhere.

Any assistance would be greatly appreciated.

By the way I use Excel X for mac

Thank you!
-Richard
 

texasalynn

Well-known Member
Joined
May 19, 2002
Messages
8,458
Welcome to MrExcel Board....

here is a sample of one way to do that

Code:
Sub copycolumns()
Range("B:B,F:F,J:J").Copy
Worksheets("Sheet2").Select
ActiveSheet.Paste
End Sub
 

Richard Schollar

MrExcel MVP
Joined
Apr 19, 2005
Messages
23,707
Hi Richard

Which version for the Mac are you using? Is it 2008 because if so the following won't work because 2008 doesn't suppot VBA. Otherwise, just running the following script in the Immediate Window of the VBE (Alt+F11 to open, Ctrl+G to show the Immediate Window) will copy the specified columns to a new worksheet:

Code:
Range("A:C,G:H,P:Q,R:U,X:AB").Copy:Worksheets.Add:Range("A1").PasteSpecial
 

RichardNJ

New Member
Joined
Jun 29, 2009
Messages
7
Welcome to MrExcel Board....

here is a sample of one way to do that

Code:
Sub copycolumns()
Range("B:B,F:F,J:J").Copy
Worksheets("Sheet2").Select
ActiveSheet.Paste
End Sub
Thanks so much for your assistance and suggestion, I apologize though for having VERY limited knowledge of excel.
What do I do with this code? Not sure where it gets placed.
And the I just change the letters in the range to the one's I need I assume?
Thanks again!
 

RichardNJ

New Member
Joined
Jun 29, 2009
Messages
7
Hi Richard

Which version for the Mac are you using? Is it 2008 because if so the following won't work because 2008 doesn't suppot VBA. Otherwise, just running the following script in the Immediate Window of the VBE (Alt+F11 to open, Ctrl+G to show the Immediate Window) will copy the specified columns to a new worksheet:

Code:
Range("A:C,G:H,P:Q,R:U,X:AB").Copy:Worksheets.Add:Range("A1").PasteSpecial

When I click on About Excel, I don't get a year in the box. It says Excel for mac v.X

When I do an Alt+F11, I get some boxes that pop open, but I am unsure where to enter this code. I'll see if I can figure it out though. Thank you!
 

Forum statistics

Threads
1,082,044
Messages
5,362,847
Members
400,694
Latest member
Ave663

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top