Anyone know how to create/save multiple files in one shot?

Sunny54321

New Member
Joined
Mar 26, 2014
Messages
22
Hi,

I was trying to figure out a simpler way to create individual excel files for over 300 people in one shot.

I have created an excel template and have a list of 300 people. Rather than one at a time, is there a way to do it in one shot?

Thanks,
Sunny
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hi,

I was trying to figure out a simpler way to create individual excel files for over 300 people in one shot.

I have created an excel template and have a list of 300 people. Rather than one at a time, is there a way to do it in one shot?

Thanks,
Sunny
You said you created a template, but if it is not saved as a .xlt or .xltx extension then it is a form that you use as a template. If it is a form that you use as a template then you can save the workbook it is in as a macro enableb workbook, .xlsm, and use the code below to create your workbooks for individuals. Lets say that the form is on sheet one of your workbook and the list of names is in Column A of sheet 2 of the workbook, the names beginning on row 2.
Code:
Sub makeWBks()
Dim sh1 As Worksheet, sh2 As Worksheet, nm As Range
    For Each nm In sh2.Range("A2", sh2.Cells(Rows.Count, 1).End(xlUp))
        If nm <> "" Then
            sh1.Copy
            ActiveWorkbook.SaveAs sh2.nm.Value & ".xlsx"
            ActiveWorkbook.Close False
        End If
    Next
End Sub

If it is in fact a template. Then the code would need to be run from another workbook and would require some modification to identify the template file, etc.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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