Excel macro to create files based on column
Closed
Praveen B J
-
20 Jun 2012 à 14:35
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 21 Jun 2012 à 10:28
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 21 Jun 2012 à 10:28
Related:
- Vba code to split excel file into multiple files based on column
- Split excel sheet into multiple files - Guide
- How to open .ps file - Guide
- Linux split file - Guide
- Windows 10 iso file download 64-bit - Download - Windows
- How to open .swf files - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
21 Jun 2012 à 10:28
21 Jun 2012 à 10:28
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