ExcelFormulas logoExcelFormulas.
KI Fragen
Dynamische ArraysQA-geprüft

SORTBY.

Sorts a range based on values in a separate range or array.

Dynamische Arrays
ExcelExcel 365Excel 2021Google Sheets

Funktionsweise im Detail.

SORTBY ist eine zentrale Formel in Excel. Sorts a range based on values in a separate range or array. Sie optimiert Ihre Tabellenkalkulationen, automatisiert Routineabfragen und sorgt für fehlerfreie Auswertungen in modernen Tabellen.

Syntax.

Standardmäßige Excel-Schreibweise
=SORTBY(array, by_array1, [sort_order1], ...)
Tipp: Parameter in eckigen Klammern [wie_dieser] sind optional, alle übrigen müssen angegeben werden.

Argumente.

Alle von dieser Funktion akzeptierten Parameter im Überblick.

arrayErforderlich

The range to sort and return.

Beispiel: A2:A5
by_array1Erforderlich

The criteria range to sort by.

Beispiel: B2:B5
sort_order1Optional

1 for Ascending (default), -1 for Descending.

Standard: 1

Praxisbeispiel.

Schritt-für-Schritt-Szenario

Order Roster - Sort Names by Score

Extract only product names, sorted by their revenue column.

ProductRevenueSorted List
Product A120—
Product B500—
Product C310—
Eingesetzte Formel
=SORTBY(A2:A5, B2:B5, -1)
Erwartetes Ergebnis::Product B

Evaluates SORTBY over the sample table cells, placing the verified output in cell C2.

Passen Sie die Eingabefelder an, um eine fertige Formel für Ihre Tabelle zu kopieren.

Generated FormulaKopierbereit

Ergebniseigenschaften.

Returns "Product B" based on sample evaluation criteria and active cell references.

Ausgabebeispiel::Product B
Datentyp::Text

Empfohlene Vorgehensweise

  • Can sort by multiple priority levels: =SORTBY(names, department, 1, salary, -1).

Typische Fehlerquellen

  • The by_array must have the exact same number of rows as the target array or #VALUE! occurs.
Kompatibilitätsmatrix

Kompatibilität nach Versionen.

Geprüft auf Basis der offiziellen Tabellenkalkulations-Engines von Microsoft und Google.

Excel✓
Unterstützt
Excel 365✓
Unterstützt
Excel 2021✓
Unterstützt
Excel 2019✕
Nein
Google Sheets✓
Unterstützt
Excel-Versionsverfügbarkeit

Introduced in Excel 365 and Excel 2021. Not available in Excel 2019.

Hinweise zu Google Tabellen

Supported in Google Sheets (uses SORTN or standard SORT with external array keys).

Häufig gestellte Fragen.

Technische Q&A
Can 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.