How to copy a selected range to a new workbook in Excel?
For copying or exporting a selected range to a new workbook, normally, you may copy the range firstly, create a new workbook, and then paste the selected range to that new workbook, finally save this workbook manually. In this tutorial, we will show you time-saving methods of copying a selected range to a new workbook in Excel with details.
You can easily copy a selected range to a new workbook with VBA code. Please do as follows.
1. Select the range you need to copy to a new workbook.
2. Press Alt + F11 keys simultaneously to open the Microsoft Visual Basic Application window.
3. In the Microsoft Visual Basic Application window, click Insert > Module. Then copy and paste the below VBA code into the Module window.
VBA code: copy selected range to a new workbook
Sub AddNew() Dim xWs As Worksheet Dim Rng As Range Set Rng = Application.Selection Application.Workbooks.Add Set xWs = Application.ActiveSheet Rng.Copy Destination: = xWs.Range("A1") End Sub
Note: In the code, A1 is the destination cell for locating the selected range content of the new workbook. You can change it based on your needs.
3. Press the F5 key to run the code.
4. Then a new workbook is created with your selected range content listed inside, please save this workbook manually.
In this section, we will introduce you the Export Range to File utility of Kutools for Excel. With this utility, you can easily export selected range to a new workbook.
Before applying Kutools for Excel, please download and install it firstly.
1. Select the range you want to copy to new workbook, then click Kutools Plus > Import / Export > Export Range to File.
2. In the Export Range to File dialog box, please do as follows.
3. And then a dialog box pops up, please type in the file name and then click the OK button.
Then the selected range is exported as a new Excel workbook immediately.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!