I need to reorder the columns of a table and I am using the sort function to do this. The formula I am using is:

=IF(ISBLANK(SORT(Table1[#All], 1, 1, TRUE)),"",SORT(Table1[#All], 1, 1, TRUE))

It works but because the numbers in the original data are the table headers, it sorts 10 before 2 etc., presumably because it recognizes this as text rather than numbers. I can't figure out how to fix this. I need to keep the original data in table format for various reasons but I specifically put the numbers in the headers because I don't want to have to amend the formula every time (right now the formula is looking at "all of table 1" instead of A1 to F60 for example so if I add rows to table 1, the sort formula automatically includes them - hope this makes sense.)

Can anyone help?