move columns to separate worksheets

  • Thread starter Thread starter amanda
  • Start date Start date
A

amanda

Hello,

I have large amounts of imported data that I would like to separate
onto indivual tabs based on the header name. Is there a non-manual
way to do so?

Thanks,
Amanda
 
Sub test()

Set oldsht = ActiveSheet
ColCount = 1
Do While oldsht.Cells(1, ColCount) <> ""
Worksheets.Add after:=Sheets(Sheets.Count)
ActiveSheet.Name = oldsht.Cells(1, ColCount).Value
Set newsht = ActiveSheet
oldsht.Columns(ColCount).Copy _
Destination:=newsht.Columns("A:A")

ColCount = ColCount + 1
Loop

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