fx =SWITCH(A1,"A","Excellent","B","Good","C","Fair","Unknown")ABCOrder #1042$1,250ApprovedOrder #1043$450ReviewOrder #1044$3,200Approved
🔀 Logic

SWITCH Formula for Logic

Match value against list of cases. Copy-paste ready for Excel, Google Sheets, and Airtable.

=SWITCH(A1,"A","Excellent","B","Good","C","Fair","Unknown")
When you need this: When you have student grades (A, B, C in A1) and need to convert to descriptions ("Excellent", "Good", "Fair").

How it works

  1. 1SWITCH compares an expression (A1) against multiple values.
  2. 2When a value matches, return its corresponding result.
  3. 3Include a default result at the end ("Unknown").

Variations

SWITCH for status codes
=SWITCH(A1,0,"Inactive",1,"Active",2,"Pending","Unknown")
Nested SWITCH example
=SWITCH(MONTH(A1),1,"Q1",2,"Q1",3,"Q1",4,"Q2","Later")

Related Formulas

Need a formula that's not here?

Generate custom formula →