PDA

View Full Version : VBA to create-rename new sheets in a workbook and export them individually as CSV



chiidzzz
09-30-2017, 10:08 PM
Hi, I have in the worksheet "AllData", a list of data that is updated every day.
I need a VBA code to copy every 20 rows from this sheet(Alldata) to a new sheet, name it "1", "2","3"...as needed
and then export every created sheet to a new workbook as CSV.
(In this example, 'Alldata' sheet contains 103 rows, the code must create 6 new sheets, named 1,2,3,4,5,6 containing respectively 20,20,20,20,20,3 rows copied from Alldata sheet.
Thank you in advance.

Bob Phillips
10-01-2017, 01:16 AM
Cross-posted at ExcelGuru (https://www.excelguru.ca/forums/showthread.php?8457-VBA-to-create-rename-new-sheets-in-a-workbook-and-export-them-individually-as-CSV)

p45cal
10-01-2017, 02:28 AM
and at https://www.excelforum.com/excel-programming-vba-macros/1202945-create-sheets-and-export-them-individually-as-csv.html

chiidzzz
10-01-2017, 02:38 AM
I am sorry for not reading the forum rules about cross posting, I will edit my post immediately.

chiidzzz
10-01-2017, 02:50 AM
To be able to post links your post count must be 5 or greater. Your post count is 2 momentarily
how can I post the links?

p45cal
10-01-2017, 02:58 AM
To be able to post links your post count must be 5 or greater. Your post count is 2 momentarily
how can I post the links?Here the are:
https://www.excelforum.com/excel-programming-vba-macros/1202945-create-sheets-and-export-them-individually-as-csv.html
https://www.excelguru.ca/forums/showthread.php?8457-VBA-to-create-rename-new-sheets-in-a-workbook-and-export-them-individually-as-CSV
http://www.ozgrid.com/forum/showthread.php?t=205786

(While your post count is low you can post them without the http part, they won't be links but enough to allow people to get to them)

chiidzzz
10-01-2017, 03:02 AM
Thank you for your reply, and sorry again. Now if someone provided a solution in a different website, should I post it here?