Forum Discussion
Jlee0730
Apr 14, 2022Copper Contributor
Macro to split excel into separate workbooks
Please help. I am not new to excel but new to macros and VBAs, I have a large spreadsheet that I would like the data to pull out specific date based on a column and then create a separate workbook f...
Richard_Miller_1985
Copper Contributor
I am looking to save the separate files in particular folder. What line would the file location replace?
HansVogelaar
Nov 22, 2022MVP
Line 51 now says
MyPath = ThisWorkbook.Path
Change this to
MyPath = "..."
where ... is the path of the target folder.
- mspratapreddyApr 18, 2024Copper ContributorThank you HansVogelaar for this wonderful piece of information. A question from a vba noob, is there a way we can create these individual files and have their serial numbers starting with 1 by default in all files.
The main file has serial no as the first column, and is there a way to maintain the sequence numbers over there?- HansVogelaarApr 18, 2024MVP
I'm sorry, I don't understand what you want. Can you explain it more clearly, and in detail? Thanks in advance.
- mspratapreddyApr 18, 2024Copper Contributor
Thought as well i would have made it complicated.
Attached image shows the master file which has the serial numbers (identified in BLUE BOX).
The image next to it is one of the split files, but the serial numbers in this file is #VALUE.
Wanted to check if the split files (second image) can also have serial numbers mentioned.