Sub CopyToNewWorkbook()
Dim thisWB As Workbook
Dim destWB As Workbook
Dim thisSht As Worksheet
Dim destSht As Worksheet
Dim mthName As String
Dim colLabel As Long, colmthStart As Long, colmthEnd As Long
Dim rowLast As Long, rowHdg As Long, colLast As Long
Dim i As Long
Dim destFullName As String
Application.ScreenUpdating = False
Application.Calculation = False
Set thisWB = ThisWorkbook
Set thisSht = ActiveSheet
colLabel = 1
colmthStart = colLabel + 1
rowHdg = 1
With thisSht
rowLast = .Cells(.Rows.Count, colLabel).End(xlUp).Row
colLast = .Cells(rowHdg, .Columns.Count).End(xlToLeft).Column
mthName = .Cells(rowHdg, colmthStart)
End With
' Loop through columns to get start and end of month
For i = colLabel + 1 To colLast
With thisSht
If .Cells(rowHdg, i) <> .Cells(rowHdg, i + 1) Then
colmthEnd = .Cells(rowHdg, i).Column
Workbooks.Add xlWBATWorksheet
Set destWB = ActiveWorkbook
Set destSht = ActiveSheet
destSht.Name = mthName
' Copy column 1 - Labels column
.Range(.Cells(rowHdg, colLabel), .Cells(rowLast, colLabel)).Copy
destSht.Range("A1").PasteSpecial Paste:=xlPasteAll ' <---- Change paste to values and format if required
' Copy month
.Range(.Cells(rowHdg, colmthStart), .Cells(rowLast, colmthEnd)).Copy
destSht.Range("A1").Offset(0, 1).PasteSpecial Paste:=xlPasteAll ' <---- Change paste to values and format if required
destSht.Range("A1").CurrentRegion.Columns.AutoFit
destSht.Range("A1").Select
destFullName = thisWB.Path & Application.PathSeparator & Replace(thisWB.Name, ".xlsm", " " & mthName & ".xlsx")
Application.DisplayAlerts = False
destWB.SaveAs Filename:=destFullName, FileFormat:=xlOpenXMLWorkbook
Application.DisplayAlerts = True
' Advance to next month
colmthStart = colmthEnd + 1
mthName = .Cells(rowHdg, colmthStart)
End If
End With
Next i
Application.CutCopyMode = False
Application.ScreenUpdating = True
Application.Calculation = True
End Sub