copy & paste columns to new worksheet

  • Thread starter Thread starter lijia137
  • Start date Start date
L

lijia137

I have a workbook with one big worksheet and i want to seperate some
columns to new worksheets, is there a macro program that I can do
instead of copy & paste columns by myself, cuz i hv to repeat the
process a lot of time, say it's always going be be column B,C,D,E to
one worksheet, FGHI to the second, ect... not sure if i've said it
clearly. thanks for any input!
 
try

Sub copycolstonewsheets()
lc = Cells(1, Columns.Count).End(xlToLeft).Column
For i = 2 To lc
Sheets.Add after:=Sheets(Sheets.Count)
ActiveSheet.Name = "sht" & i - 4
Sheets("sheet1").Columns(i).Resize(, 4).Copy Range("a1")
i = i + 4
Next i
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top