How to split an Excel workbook into multiple files

Опубликовано: 20 Октябрь 2024
на канале: learnexcel.video
44,043
213

Sometimes you've got one workbook with lots of sheets when what you really want is lots of workbooks with one sheet each. This video shows how to split them with a dash of VBA.

Sub Splitziez()

Dim strPath As String
strPath = "Location of your file"
For Each sheetz0r In ThisWorkbook.Sheets
sheetz0r.Copy
Application.ActiveWorkbook.SaveAs Filename:=strPath & "\" & sheetz0r.Name & ".xlsx"
Application.ActiveWorkbook.Close False
Next
End Sub