Columns to Tabs

excelster1

New Member
Joined
Nov 8, 2006
Messages
1
I have a single spreadsheet with one tab containing 142 columns. Each column indicates a separate department within our organization. I am looking for a macro that will take 142 columns in one tab and break them out to one column in 142 tabs…all within the same spreadsheet.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Possibly something like this

Code:
Sub splitcolstotabs()
Dim cols As Long
cols = Sheet1.Cells(1, Columns.Count).End(xlToLeft).Column
For i = 1 To cols
    Sheets.Add
    ActiveSheet.Name = "Sheet " & Sheet1.Cells(1, i)
    Sheet1.Columns(i).Copy ActiveSheet.Cells(1, 1)
Next i
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,245
Members
452,900
Latest member
LisaGo

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