Google Sheet Sort

Today I learned about the sort function in Google Sheets. This came in handy to show different sorted views of one sheet on another. Combining a drop-down with a nested IF statement allows selection of the sort to apply on the data in one sheet to populate another sheet.

The sheet Contacts contains the primary data. A Sorted sheet contains a drop-down in A1 with values Latest and Priority. The sort appears in B2, under the headers:

=if(A1="Latest",sort(Contacts!A2:BI,2,false),if(A1="Priority",sort(Contacts!A2:BI,1,false,4,true,6,true)))

And in Sorted!B2 this formula copies over all of the headers from Contacts:

=arrayformula(Contacts!A1:BI1)

No more manual sorting!