Save part of the worksheet as a new workbook and in a specific file location and file name

woah

New Member
Joined
May 10, 2023
Messages
24
Office Version
  1. 2016
Platform
  1. Windows
Hi there, I would like to use VBA to save part of the worksheet to a new workbook, and save it in a specific file location and a specific file name.

I only want to save the range (Cell A14 to Column G) of sheet "Locker". As sometimes Column G contains blank space, so I only want to save up to the last row of Column D. Some cells contain formula, which I don't need in the new workbook. I want to present the values in the new workbook but still in the same format as the current worksheet.

I want to save the new workbook in a specific file location and a specific file name. Cell B10 will be the file name.

I want the new worksheet in the new workbook still named as "Locker"

Please kindly advise. Thank you very much.

I don't know how to upload the file here, so I have uploaded the file to another website. Please find it here (https://file.io/iXcJ0G9VZvf6)
Sample File
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Save part of the worksheet as a new workbook and in a specific file location and file name
There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,549
Members
449,089
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top