Syntax
Switch(Formula, Match1, Result1 [, Match2, Result2, ...] [, DefaultResult])Parameters
Formula- The value to compare.
Match- A value to test for equality.
Result- Returned when its match is equal to Formula.
DefaultResultoptional- Returned when nothing matches.
Examples
=Switch(StatusCode, 200, "OK", 404, "Not found", "Error")A label for an HTTP status code
Maker notes
- Cleaner than nested If calls when every branch tests the same value.