Funktionsweise im Detail.
SWITCH ist eine zentrale Formel in Excel. Evaluates an expression against a list of values and returns the matching result. Sie optimiert Ihre Tabellenkalkulationen, automatisiert Routineabfragen und sorgt für fehlerfreie Auswertungen in modernen Tabellen.
Syntax.
Standardmäßige Excel-Schreibweise=SWITCH(expression, val1, result1, [default])Argumente.
Alle von dieser Funktion akzeptierten Parameter im Überblick.
The value to evaluate.
Beispiel:A2First value to test for equality.
Beispiel:1Output returned if expression matches val1.
Beispiel:"Sunday"Praxisbeispiel.
Schritt-für-Schritt-SzenarioDay Number to Name Mapping
Convert numeric day codes into weekday names.
| Day Code | Weekday Name |
|---|---|
| 2 | — |
| 1 | — |
| 3 | — |
=SWITCH(A2, 1, "Sunday", 2, "Monday", 3, "Tuesday", "Other")Evaluates SWITCH over the sample table cells, placing the verified output in cell B2.
Formel-Generator.
Vollständigen Assistenten öffnenPassen Sie die Eingabefelder an, um eine fertige Formel für Ihre Tabelle zu kopieren.
=SWITCH()Ergebniseigenschaften.
Returns "Monday" based on sample evaluation criteria and active cell references.
Empfohlene Vorgehensweise
- Always specify an optional default value at the end to catch unanticipated inputs.
Typische Fehlerquellen
- If no value matches and no default argument is provided, SWITCH returns #N/A.
Kompatibilität nach Versionen.
Geprüft auf Basis der offiziellen Tabellenkalkulations-Engines von Microsoft und Google.
In Excel 2016 or older, use nested IFs or the CHOOSE function.
Introduced in Excel 2019 and Excel 365. Supported in Excel 2019, 2021, and 365.
100% compatible with Google Sheets with identical expression evaluation rules.
Häufig gestellte Fragen.
Technische Q&ACan I use SWITCH 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: =SWITCH(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 SWITCH?↓
If no value matches and no default argument is provided, SWITCH returns #N/A.
Does SWITCH work identically in Google Sheets?↓
Yes, SWITCH is supported in both Microsoft Excel and Google Sheets with standard evaluation behavior.