Split excel worksheets to individual files

If we have about many sheets in excel, and save all the sheets as their own files will definitely was not about to do this by hand. it take a take time!. I found a good tips from the internet, to solve this problem,in which using the macro!.

Here the code:

Sub CreateNewWBS()
 Dim wbThis As Workbook
 Dim wbNew As Workbook
 Dim ws As Worksheet
 Dim strFilename As String
 Set wbThis = ThisWorkbook
 For Each ws In wbThis.Worksheets
 strFilename = wbThis.Path & "/" & ws.Name
 ws.Copy
 Set wbNew = ActiveWorkbook
 wbNew.SaveAs strFilename
 wbNew.Close
 Next ws
End Sub

References/Sources:

http://superuser.com/questions/561923/how-can-one-split-an-excel-xlsx-file-that-contains-multiple-sheets-into-sep

Excel – save worksheets as separate files

References/Sources:

About zulkarnainh

I was born in Melaka (1987), holds the degree in B.Eng.(2010), M.Eng (2012) and Ph.D. (2016) in Civil Engineering at Universiti Teknologi Malaysia. I have been the UniMAP since 2016 and currently serving as Senior Lecturer. Feel free to contact me if you are interested to collaborate or pursuit a study (Master or Ph.D.) with me. Thank you!
This entry was posted in Code and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *