Google-sheets – Auto sort script sorting different sheets by different columns

google sheetsgoogle-apps-scriptsorting

I have a master sheet where data is entered.
I would like the other sheets in the book (which currently auto-populate from the master sheet) to sort (in descending order) by their respective column in the master sheet.
For example: Sheet "Alice" sorts by column "Alice" from the master sheet, sheet "Bernie" sorts by column "Bernie from the master sheet, etc.

So if my "Master" sheet is

 Class      Alice      Bernie      Courtney
 Math         1          2            
 English      3          1            2
 Science      2          3            1

Then sheet "Alice" would auto-sort to:

 Class      Alice      Bernie      Courtney
 English      3          1            2
 Science      2          3            1
 Math         1          2            

And sheet "Bernice" would auto-sort to:

 Class      Alice      Bernie      Courtney
 Science      2          3            1
 Math         1          2            
 English      3          1            2

And sheet "Courtney" would auto-sort to

 Class      Alice      Bernie      Courtney
 English      3          1            2
 Science      2          3            1
 Math         1          2            

(Please note each sheet has the same values for each entry in the matrix–the order of the rows is simply being rearranged according to which column the sheet is meant to sort by.)

Best Answer

Try

Alice! A1:

 =SORT('Master'!A1:D4,2,0) 

Bernice! A1:

 =SORT('Master'!A1:D4,3,0) 

and so on..