How to save a selection as individual file in Excel?
When we deal with a long worksheet, we may want to save only a selected range instead of a whole workbook as a new Excel file, such as sending different selections of a worksheet to different persons. We will introduce methods to save selections in a worksheet as individual Excel files.
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
The most common method is to copy the selection that you want to save as an individual file in Excel, create a new workbook, and paste the copied selection on it, then save it.
However, you may lose some format styles in the selection during copying and pasting, such as row height, etc.
Using Macro is an easy way to save the selections as individual files without copying and pasting to a new workbook.
1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.
2. Click Insert > Moudle, and paste the following code into the Moudle Window.
VBA: export range to Excel file
Sub ExportRangetoExcel() 'Update 20130916 Dim wb As Workbook Dim saveFile As String Dim WorkRng As Range Dim address As String Dim defult As Integer On Error Resume Next xTitleId = "KutoolsforExcel" Set WorkRng = Application.Selection Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.address, Type:=8) Application.ScreenUpdating = False Application.DisplayAlerts = False defult = Application.SheetsInNewWorkbook Application.SheetsInNewWorkbook = 1 Set wb = Application.Workbooks.Add Application.SheetsInNewWorkbook = defult WorkRng.Copy wb.Worksheets(1).Paste address = Replace(WorkRng.address, ":", "-") address = Replace(address, "$", "") address = Replace(address, ".", "") saveFile = Application.GetSaveAsFilename(InitialFileName:=address, fileFilter:="Excel Workbooks (*.xlsx),*.xlsx") wb.SaveAs Filename:=saveFile wb.Close Application.CutCopyMode = False Application.DisplayAlerts = True Application.ScreenUpdating = True End Sub
3. Then press F5 key to execute the operation, and a prompt box will pop out to remind you select a range that you want to save as individual Excel file. See screenshot:
4. Then click OK, and specify a folder to locate this new file and then enter a name for your file in the Save As dialog box, see screenshot:
5. And then click Save button, the selected range has been saved as a new Excel workbook.
Using Macro may be a little hard for starter of Microsoft Excel, and we will introduce another easy and convenient way provided with Kutools for Excel.
Kutools for Excel's Export Range to File tool can help us conveniently save selections as individual files quickly.
Kutools for Excel includes more than 300 handy Excel tools. Free to try with no limitation in 30 days. Get it Now.
If you have installed Kutools for Excel, please do as this:
1. Click Enterprise > Import / Export > Export Range to File, see screenshot:
2. In the Export Range to File dialog box, click the button to select the range that you want to save it as an individual file, and then check Excel workbook option in File format section, at last, you can check the workbook options as you need.
3. Click OK, then it will pop up a Select a name and location for the exported range dialog box, enter a name for this new file, and select a folder where you will save it in. And then click Save button.
1. The Export Range to File tool of Kutools for Excel can save all formatting in the selections.
2. Kutools for Excel's Export Range to File tool makes it possible to easily export a range of date to a file, either an Excel workbook, a CSV, a simple HTML or all formatting HTML.
3. If you check Open the file after export option in the dialog box, the new file will be launched automatically after exporting it successfully.
To know more about this feature, please click Export Range to File.
- Export Excel data as HTML
- Save selection or entire workbook as PDF
- Export Excel data to CSV files in Excel
- Export Excel data to Text files in Excel