Come funziona nel dettaglio.
SORTBY è una funzione fondamentale di Excel. Sorts a range based on values in a separate range or array. Consente di velocizzare la gestione dei fogli di calcolo, ridurre gli errori e creare report automatizzati professionali.
Sintassi.
Notazione Ufficiale Excel=SORTBY(array, by_array1, [sort_order1], ...)Argomenti.
Di seguito l'elenco dettagliato di tutti i parametri accettati da questa funzione.
The range to sort and return.
Valore d'esempio:A2:A5The criteria range to sort by.
Valore d'esempio:B2:B51 for Ascending (default), -1 for Descending.
Valore predefinito: 1Esempio pratico.
Scenario di utilizzoOrder Roster - Sort Names by Score
Extract only product names, sorted by their revenue column.
| Product | Revenue | Sorted List |
|---|---|---|
| Product A | 120 | — |
| Product B | 500 | — |
| Product C | 310 | — |
=SORTBY(A2:A5, B2:B5, -1)Evaluates SORTBY over the sample table cells, placing the verified output in cell C2.
Generatore di formula.
Apri Procedura Guidata CompletaCompila i campi qui sotto per creare una formula personalizzata pronta da incollare nel tuo foglio di calcolo.
=SORTBY()Caratteristiche del risultato.
Returns "Product B" based on sample evaluation criteria and active cell references.
Migliori Pratiche
- Can sort by multiple priority levels: =SORTBY(names, department, 1, salary, -1).
Errori Più Frequenti
- The by_array must have the exact same number of rows as the target array or #VALUE! occurs.
Compatibilità per programma e versione.
Verifica tecnica eseguita sui motori di calcolo ufficiali di Microsoft Excel e Google Fogli.
In Excel 2019, sort by secondary key in Data > Sort or use multiple RANK calculations.
Introduced in Excel 365 and Excel 2021. Not available in Excel 2019.
Supported in Google Sheets (uses SORTN or standard SORT with external array keys).
Domande frequenti.
Domande TecnicheCan I use SORTBY across different worksheets in Excel?↓
Yes. You can reference cells located on other sheets by including the sheet name followed by an exclamation mark, for example: =SORTBY(Sheet2!A2:A10). If the sheet name contains spaces, enclose it in single quotes: ='Q1 Report'!A2:A10.
What is the most common reason for errors in SORTBY?↓
The by_array must have the exact same number of rows as the target array or #VALUE! occurs.
Does SORTBY work identically in Google Sheets?↓
Yes, SORTBY is supported in both Microsoft Excel and Google Sheets with standard evaluation behavior.