{"id":892,"date":"2020-06-17T15:07:36","date_gmt":"2020-06-17T22:07:36","guid":{"rendered":"https:\/\/SUMMALAI.COM\/?p=892"},"modified":"2020-06-17T15:08:39","modified_gmt":"2020-06-17T22:08:39","slug":"split-an-excel-workbook-into-multiple-workbooks-by-vba","status":"publish","type":"post","link":"https:\/\/SUMMALAI.COM\/?p=892","title":{"rendered":"Split an EXCEL workbook into multiple workbooks by VBA"},"content":{"rendered":"\n<p>You may need to split a large workbook to separate Excel files with saving each worksheet of the workbook as an individual Excel file. For example, you can split a workbook into multiple individual Excel files and then deliver each file to different person to handle it. By doing so, you can get certain persons handle specific data, and keep your data safe. This article will introduce ways to split a large workbook to separate Excel files based on each worksheet.<\/p>\n\n\n\n<p>The following VBA code can help you quickly split multiple worksheets of current workbook to separate Excel files, please do as follows:<\/p>\n\n\n\n<p><strong>1<\/strong>. Create a new folder for the workbook that you want to split, because the split Excel files will be stayed at the same folder as this master workbook.<\/p>\n\n\n\n<p><strong>2<\/strong>. Hold down the&nbsp;<strong>ALT + F11<\/strong>&nbsp;keys in Excel, and it opens the&nbsp;<strong>Microsoft Visual Basic for Applications<\/strong>&nbsp;window.<\/p>\n\n\n\n<p><strong>3<\/strong>. Click&nbsp;<strong>Insert<\/strong>&nbsp;&gt;&nbsp;<strong>Module<\/strong>, and paste the following code in the Module Window.<\/p>\n\n\n\n<p><strong>VBA: Split a workbook into multiple workbooks and save in the same folder<\/strong><\/p>\n\n\n\n<p><em>Sub Splitbook()<br>&#8216;Updateby20140612<br>Dim xPath As String<br>xPath = Application.ActiveWorkbook.Path<br>Application.ScreenUpdating = False<br>Application.DisplayAlerts = False<br>For Each xWs In ThisWorkbook.Sheets<br>   xWs.Copy<br>   Application.ActiveWorkbook.SaveAs Filename:=xPath &amp; &#8220;\\&#8221; &amp; xWs.Name &amp; &#8220;.xlsx&#8221;<br>   Application.ActiveWorkbook.Close False<br>Next<br>Application.DisplayAlerts = True<br>Application.ScreenUpdating = True<br>End Sub<\/em><\/p>\n\n\n\n<p><strong>4<\/strong>. Press the<strong>&nbsp;F5<\/strong>&nbsp;key to run this code. And the workbook is split to separate Excel files in the same folder with the original workbook. See screenshot:<br><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/cdn.extendoffice.com\/images\/stories\/doc-excel\/split-excel-file\/doc-split-workbook-to-files-vba-01.png\" alt=\"\" width=\"773\" height=\"445\"><\/p>\n\n\n\n<p>Note: If one of the sheets has the same name as the workbook, this VBA cannot work.<\/p>\n\n\n\n<p>Ref: <a href=\"https:\/\/www.extendoffice.com\/documents\/excel\/628-excel-split-workbook.html\">https:\/\/www.extendoffice.com\/documents\/excel\/628-excel-split-workbook.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You may need to split a large workbook to separate Excel files with saving each worksheet of the workbook as an individual Excel file. For example, you can split a workbook into multiple individual Excel files and then deliver each file to different person to handle it. By doing so, you can get certain persons <a class=\"read-more\" href=\"https:\/\/SUMMALAI.COM\/?p=892\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[10,18],"tags":[],"class_list":["post-892","post","type-post","status-publish","format-standard","hentry","category-microsoft","category-microsoft-office"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"You may need to split a large workbook to separate Excel files with saving each worksheet of the workbook as an individual Excel file. For example, you can split a workbook into multiple individual Excel files and then deliver each file to different person to handle it. By doing so, you can get certain persons\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Summa Lai\"\/>\n\t<meta name=\"keywords\" content=\"microsoft family,microsoft office\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/SUMMALAI.COM\/?p=892\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=892#article\",\"name\":\"Split an EXCEL workbook into multiple workbooks by VBA | Summa Lai\",\"headline\":\"Split an EXCEL workbook into multiple workbooks by VBA\",\"author\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?author=2#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/cdn.extendoffice.com\\\/images\\\/stories\\\/doc-excel\\\/split-excel-file\\\/doc-split-workbook-to-files-vba-01.png\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=892\\\/#articleImage\"},\"datePublished\":\"2020-06-17T15:07:36-07:00\",\"dateModified\":\"2020-06-17T15:08:39-07:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=892#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=892#webpage\"},\"articleSection\":\"Microsoft Family, Microsoft Office\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=892#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/SUMMALAI.COM\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=10#listItem\",\"name\":\"Microsoft Family\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=10#listItem\",\"position\":2,\"name\":\"Microsoft Family\",\"item\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=10\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=18#listItem\",\"name\":\"Microsoft Office\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=18#listItem\",\"position\":3,\"name\":\"Microsoft Office\",\"item\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=18\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=892#listItem\",\"name\":\"Split an EXCEL workbook into multiple workbooks by VBA\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=10#listItem\",\"name\":\"Microsoft Family\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=892#listItem\",\"position\":4,\"name\":\"Split an EXCEL workbook into multiple workbooks by VBA\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=18#listItem\",\"name\":\"Microsoft Office\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/#person\",\"name\":\"sladmin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=892#personImage\",\"url\":\"https:\\\/\\\/SUMMALAI.COM\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/Summa_Logo-150x150.png\",\"width\":96,\"height\":96,\"caption\":\"sladmin\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?author=2#author\",\"url\":\"https:\\\/\\\/SUMMALAI.COM\\\/?author=2\",\"name\":\"Summa Lai\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=892#authorImage\",\"url\":\"https:\\\/\\\/SUMMALAI.COM\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/Summa_Logo-150x150.png\",\"width\":96,\"height\":96,\"caption\":\"Summa Lai\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=892#webpage\",\"url\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=892\",\"name\":\"Split an EXCEL workbook into multiple workbooks by VBA | Summa Lai\",\"description\":\"You may need to split a large workbook to separate Excel files with saving each worksheet of the workbook as an individual Excel file. For example, you can split a workbook into multiple individual Excel files and then deliver each file to different person to handle it. By doing so, you can get certain persons\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=892#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?author=2#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?author=2#author\"},\"datePublished\":\"2020-06-17T15:07:36-07:00\",\"dateModified\":\"2020-06-17T15:08:39-07:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/#website\",\"url\":\"https:\\\/\\\/SUMMALAI.COM\\\/\",\"name\":\"Summa Lai\",\"description\":\"Never Stop Learning, Building a Little Wiki...\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Split an EXCEL workbook into multiple workbooks by VBA | Summa Lai","description":"You may need to split a large workbook to separate Excel files with saving each worksheet of the workbook as an individual Excel file. For example, you can split a workbook into multiple individual Excel files and then deliver each file to different person to handle it. By doing so, you can get certain persons","canonical_url":"https:\/\/SUMMALAI.COM\/?p=892","robots":"max-image-preview:large","keywords":"microsoft family,microsoft office","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/SUMMALAI.COM\/?p=892#article","name":"Split an EXCEL workbook into multiple workbooks by VBA | Summa Lai","headline":"Split an EXCEL workbook into multiple workbooks by VBA","author":{"@id":"https:\/\/SUMMALAI.COM\/?author=2#author"},"publisher":{"@id":"https:\/\/SUMMALAI.COM\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/cdn.extendoffice.com\/images\/stories\/doc-excel\/split-excel-file\/doc-split-workbook-to-files-vba-01.png","@id":"https:\/\/SUMMALAI.COM\/?p=892\/#articleImage"},"datePublished":"2020-06-17T15:07:36-07:00","dateModified":"2020-06-17T15:08:39-07:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/SUMMALAI.COM\/?p=892#webpage"},"isPartOf":{"@id":"https:\/\/SUMMALAI.COM\/?p=892#webpage"},"articleSection":"Microsoft Family, Microsoft Office"},{"@type":"BreadcrumbList","@id":"https:\/\/SUMMALAI.COM\/?p=892#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM#listItem","position":1,"name":"Home","item":"https:\/\/SUMMALAI.COM","nextItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=10#listItem","name":"Microsoft Family"}},{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=10#listItem","position":2,"name":"Microsoft Family","item":"https:\/\/SUMMALAI.COM\/?cat=10","nextItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=18#listItem","name":"Microsoft Office"},"previousItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=18#listItem","position":3,"name":"Microsoft Office","item":"https:\/\/SUMMALAI.COM\/?cat=18","nextItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?p=892#listItem","name":"Split an EXCEL workbook into multiple workbooks by VBA"},"previousItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=10#listItem","name":"Microsoft Family"}},{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?p=892#listItem","position":4,"name":"Split an EXCEL workbook into multiple workbooks by VBA","previousItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=18#listItem","name":"Microsoft Office"}}]},{"@type":"Person","@id":"https:\/\/SUMMALAI.COM\/#person","name":"sladmin","image":{"@type":"ImageObject","@id":"https:\/\/SUMMALAI.COM\/?p=892#personImage","url":"https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2020\/05\/Summa_Logo-150x150.png","width":96,"height":96,"caption":"sladmin"}},{"@type":"Person","@id":"https:\/\/SUMMALAI.COM\/?author=2#author","url":"https:\/\/SUMMALAI.COM\/?author=2","name":"Summa Lai","image":{"@type":"ImageObject","@id":"https:\/\/SUMMALAI.COM\/?p=892#authorImage","url":"https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2020\/05\/Summa_Logo-150x150.png","width":96,"height":96,"caption":"Summa Lai"}},{"@type":"WebPage","@id":"https:\/\/SUMMALAI.COM\/?p=892#webpage","url":"https:\/\/SUMMALAI.COM\/?p=892","name":"Split an EXCEL workbook into multiple workbooks by VBA | Summa Lai","description":"You may need to split a large workbook to separate Excel files with saving each worksheet of the workbook as an individual Excel file. For example, you can split a workbook into multiple individual Excel files and then deliver each file to different person to handle it. By doing so, you can get certain persons","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/SUMMALAI.COM\/#website"},"breadcrumb":{"@id":"https:\/\/SUMMALAI.COM\/?p=892#breadcrumblist"},"author":{"@id":"https:\/\/SUMMALAI.COM\/?author=2#author"},"creator":{"@id":"https:\/\/SUMMALAI.COM\/?author=2#author"},"datePublished":"2020-06-17T15:07:36-07:00","dateModified":"2020-06-17T15:08:39-07:00"},{"@type":"WebSite","@id":"https:\/\/SUMMALAI.COM\/#website","url":"https:\/\/SUMMALAI.COM\/","name":"Summa Lai","description":"Never Stop Learning, Building a Little Wiki...","inLanguage":"en-US","publisher":{"@id":"https:\/\/SUMMALAI.COM\/#person"}}]}},"aioseo_meta_data":{"post_id":"892","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-20 22:14:40","updated":"2024-01-12 04:33:26","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/SUMMALAI.COM\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/SUMMALAI.COM\/?cat=10\" title=\"Microsoft Family\">Microsoft Family<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/SUMMALAI.COM\/?cat=18\" title=\"Microsoft Office\">Microsoft Office<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tSplit an EXCEL workbook into multiple workbooks by VBA\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/SUMMALAI.COM"},{"label":"Microsoft Family","link":"https:\/\/SUMMALAI.COM\/?cat=10"},{"label":"Microsoft Office","link":"https:\/\/SUMMALAI.COM\/?cat=18"},{"label":"Split an EXCEL workbook into multiple workbooks by VBA","link":"https:\/\/SUMMALAI.COM\/?p=892"}],"_links":{"self":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=892"}],"version-history":[{"count":0,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/892\/revisions"}],"wp:attachment":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}