Forum Discussion
Macro to split excel into separate workbooks
I'm sorry, I don't understand what you want. Can you explain it more clearly, and in detail? Thanks in advance.
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.
- HansVogelaarApr 18, 2024MVP
The code that I posted pastes the data as values, i.e. without formulas, so the sequence numbers should be preserved.
Do you want the sequence numbers to start with 1 in each file?
- mspratapreddyApr 19, 2024Copper Contributor
Yes, i'd love for them to start the sequence with 1. This would put an end to the little manual intervention required.
- HansVogelaarApr 19, 2024MVP
Immediately above the line
'Save the file in the new folder and close it
insert
'Fill column A WSNew.Range(WSNew.Range("A2"), WSNew.Range("A1").End(xlDown)).Formula = "=ROW()-1"