Good afternoon community,
I need your help as soon as someone could tell me how I could generate a macro that exports the report keeping the texts of the header and the end but different tables grouped by the first column come out.

Original

Desired departures


The table can change in lines and number of groups but the texts will be the same in any case.