SWITCH

Modified on Fri, 31 May at 9:57 AM

Introduction

Evaluates an expression against a list of values and returns the corresponding result of the first matching value. If no match is found, the default result is returned if provided.


FORMULASWITCH(expression, value1, result1, value2, result2, ..., [defaultResult])
EXAMPLE FORMULASWITCH(Col_1, 10, "Low", 15, "Moderate", 20, "High", "No Match")
EXAMPLE INPUT20
EXAMPLE OUTPUTHIGH


Sample Usage


Valid ExamplesInvalid Examples
SWITCH(Monthly Units, 3,"Low", 724,"high")SWITCH(Location, USA,"Low", Europe,"high")

SWITCH(Location, "USA","10", "EU", "13")



Notes

  • SWITCH can only be used with a text column as input when quotes are present

See Also


Still having issues? Contact us at support@gigasheet.com

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article