Thanks again for your support
please You have two point to complete the code as required
1- add a condition to clear the following pages In case if the data transferred is less than or equal to 27 rows.
in other words, If the data transferred from the source sheet is less than or equal to 27 rows, the pages that follow first page are deleted
and If the data transferred from the source sheet is Greater than 27 rows Will be transferred The first 27 rows on the first page And the rest on the second page, and so on
2- sort the data in the Output worksheets ( successful & Unsuccessful ) based on the two columns A & C
That's all ... I have included the example workbook with this reply so you can have a better idea. Thank you so much for all your assistance
Last edited by jonsonbero; 01-26-2023 at 08:28 AM.