# SWITCH

Spread for WinForms provides advanced software components that support Excel import/export, full cell customization, an extensive calculation engine with over 450 functions and more, all with zero dependencies on Excel.

## Content



This function compares specified expression against given list of values and returns the result according to the first matching value.

## Syntax

SWITCH(*expression,value, result, result\_no\_match*)

## Arguments

This function has the following arguments:

| **Argument** | **Description** |
| -------- | ----------- |
| *expression* | Value or expression to compare |
| *value* | Value compared against expression |
| *result* | Value returned if comparision matches |
| *result\_no\_match* | Value returned if comparision do not match |

## Remarks

In this function, argument *value* and *result* can take upto 126 different entries each.

## Data Types

Accepts data of any type. Returns data of any type.

## Examples

`SWITCH(WEEKDAY(A2),1,"Sunday",2,"Monday",3,"Tuesday","No match")` gives the result `No match`.

## Version Available

This function is available in Spread for Windows Forms 11.0 or later.