Make spreadsheet sorting more efficient