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...
adsuarez
Jan 09, 2023Copper Contributor
I am a VBA novice, so any help is appreciated. I have this Macro working, but I'm trying to add another component to the file name. For example, in the new worksheet, I want the value in cell C2 to always be part of the file name. But when I do something like below, the Macro runs with no errors, but doesn't actually produce any files...
WSNew.Parent.SaveAs MyPath & Range("C2") & "_" & cell.Value & FileExtStr, FileFormatNum
Any ideas?
HansVogelaar
Jan 09, 2023MVP
Does this work?
WSNew.Parent.SaveAs MyPath & WSNew.Range("C2") & "_" & cell.Value & FileExtStr, FileFormatNum