Excel macro to create files based on column
Closed
Praveen B J
-
Jun 20, 2012 at 02:35 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jun 21, 2012 at 10:28 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jun 21, 2012 at 10:28 AM
Related:
- Vba code to split excel file into multiple files based on column
- Windows 10 iso file download 64-bit - Download - Windows
- Kmspico zip file download - Download - Other
- How to delete multiple files on mac - Guide
- Battery reset code - Guide
- How to open msi files on android - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Jun 21, 2012 at 10:28 AM
Jun 21, 2012 at 10:28 AM
Hi Praveen,
This macro will create files for each name found in column AJ, starting from row2 until the last data found. Files will be saved in the same folder as the file you are running the macro from.
Sub CreateFiles()
Best regards,
Trowa
This macro will create files for each name found in column AJ, starting from row2 until the last data found. Files will be saved in the same folder as the file you are running the macro from.
Sub CreateFiles()
Dim lRow As Integer lRow = Range("AJ" & Rows.Count).End(xlUp).Row For Each cell In Range("AJ2:AJ" & lRow) Workbooks.Add.SaveAs Filename:=cell.Value & ".xls" Next cell End Sub
Best regards,
Trowa