About the format transferring, that can only be done through VBA.
About the sorting, check this sample instead.
Note that I make it so that when you change the number, the table will pull enough data so that the number of rows on each table is about the same as much as possible.
Bookmarks