I have in the worksheet "AllData", a list of data that is updated every day.
I want to copy every 20 rows from this sheet (Alldata) to a new sheet, name it "1", "2", "3"...consecutively as needed, and then export every created sheet to a new workbook as CSV.
(Example: 'Alldata' sheet contains 103 rows, and the code must create six new sheets, named 1, 2, 3, 4, 5, and 6 containing respectively 20, 20, 20, 20, 20, and 3 rows copied from the Alldata sheet.
How can this be done?
This converts a range to a CSV file directly:
Use the below for creating a new sheet:
And below procedure for calling export function:
And use below for export CSV, with string reformat addition function. (Note: in above module or call with appropriated module name, before.)
References:
stackoverflow_Named Sheets
stackoverflow_CSV