---
title: "IFS and SWITCH practice: 4 exercises with answers"
description: "Practice IFS and SWITCH in Excel: grades, shipping price bands, commission rates and turning codes into names, checked in a live spreadsheet."
canonical_url: "https://excelsavvy.com/practice/ifs-switch"
meta:
  "og:description": "Practice IFS and SWITCH in Excel: grades, shipping price bands, commission rates and turning codes into names, checked in a live spreadsheet."
  "og:image": "https://excelsavvy.com/_og/d/c_Page%2Ctitle_~SUZTIGFuZCBTV0lUQ0ggcHJhY3RpY2U6IDQgZXhlcmNpc2VzIHdpdGggYW5zd2Vycw%2Cdescription_~UHJhY3RpY2UgSUZTIGFuZCBTV0lUQ0ggaW4gRXhjZWw6IGdyYWRlcywgc2hpcHBpbmcgcHJpY2UgYmFuZHMsIGNvbW1pc3Npb24gcmF0ZXMgYW5kIHR1cm5pbmcgY29kZXMgaW50byBuYW1lcywgY2hlY2tlZCBpbiBhIGxpdmUgc3ByZWFkc2hlZXQu%2Ceyebrow_Excel%2Bpractice%2Bexercises%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiLCJDIl0sInJvd3MiOlt7Im4iOjEsImNlbGxzIjpbIlN0dWRlbnQiLCJTY29yZSIsIkdyYWRlIl19LHsibiI6MiwiY2VsbHMiOlsiSm9uYXMiLCI3NiIsIiJdfV0sInRhcmdldCI6WzEsMl19fQ%2Cp_Ii9wcmFjdGljZS9pZnMtc3dpdGNoIg%2Cs_p-Vjq0icPoXQJfjd.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "IFS and SWITCH practice: 4 exercises with answers"
  "twitter:image": "https://excelsavvy.com/_og/d/c_Page%2Ctitle_~SUZTIGFuZCBTV0lUQ0ggcHJhY3RpY2U6IDQgZXhlcmNpc2VzIHdpdGggYW5zd2Vycw%2Cdescription_~UHJhY3RpY2UgSUZTIGFuZCBTV0lUQ0ggaW4gRXhjZWw6IGdyYWRlcywgc2hpcHBpbmcgcHJpY2UgYmFuZHMsIGNvbW1pc3Npb24gcmF0ZXMgYW5kIHR1cm5pbmcgY29kZXMgaW50byBuYW1lcywgY2hlY2tlZCBpbiBhIGxpdmUgc3ByZWFkc2hlZXQu%2Ceyebrow_Excel%2Bpractice%2Bexercises%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiLCJDIl0sInJvd3MiOlt7Im4iOjEsImNlbGxzIjpbIlN0dWRlbnQiLCJTY29yZSIsIkdyYWRlIl19LHsibiI6MiwiY2VsbHMiOlsiSm9uYXMiLCI3NiIsIiJdfV0sInRhcmdldCI6WzEsMl19fQ%2Cp_Ii9wcmFjdGljZS9pZnMtc3dpdGNoIg%2Cs_p-Vjq0icPoXQJfjd.png"
---

> Index of every page on this site: [llms.txt](https://excelsavvy.com/llms.txt)

# **IFS and SWITCH practice exercises**

Choose between more than two outcomes without stacking IF inside IF: IFS for a list of tests, SWITCH for a list of exact values.

[**Start the first exercise**](https://excelsavvy.com/practice/ifs-switch/ifs-grades)

IFS(

## **How IFS and SWITCH work**

IFS checks a list of tests in order and returns the answer next to the first test that is true. You give it pairs of arguments: a test, then what to show when that test is true, repeated as often as you need. SWITCH is the sibling for exact values. It takes one value to look at, then pairs of a match and a result, and an optional last argument for anything else.

`**=IFS(B2>=90,"A",B2>=70,"B",TRUE,"C")**` gives A for 90 or more, B for 70 to 89 and C for everything else. `**=SWITCH(B2,"N","North","S","South","Other")**` turns the code in B2 into a name, with Other as the fallback.

If no test in IFS is true, you get #N/A, so end with TRUE as a catch-all, as in the grade example. Put the tests in order, because IFS stops at the first one that is true. Both functions need Excel 2019 or Microsoft 365. The exercises below cover grades, shipping price bands, turning codes into names and commission rates.

1. [**1****Grades with IFS**Grade the score in B2 with IFS: 90 or more is "A", 70 or more is "B", and anything else is "C". Use TRUE as the last test.](https://excelsavvy.com/practice/ifs-switch/ifs-grades)
2. [**2****Shipping price bands with IFS****Premium**Shipping costs 45 up to 1 kg, 69 up to 5 kg and 110 for anything heavier. In C2, use IFS to find the price for the weight in B2.](https://excelsavvy.com/practice/ifs-switch/ifs-price-bands)
3. [**3****Turn codes into names with SWITCH****Premium**In C2, use SWITCH to turn the code in B2 into a name: "N" is "North", "S" is "South", and any other code is "Other".](https://excelsavvy.com/practice/ifs-switch/switch-codes-to-names)
4. [**4****Commission rates with IFS****Premium**Reps earn 10% commission on sales of 10,000 or more, 5% from 5,000 and nothing below that. In C2, multiply the sales in B2 by the rate IFS picks: B2\*IFS(B2>=10000,0.1,B2>=5000,0.05,TRUE,0).](https://excelsavvy.com/practice/ifs-switch/ifs-commission-rates)

## **Functions in this topic**

- [**IFS**](https://excelsavvy.com/functions/ifs)

## **Read the guide**

- [**Excel IF formulas: from one condition to many**](https://excelsavvy.com/learn/excel-if-function)

## **Questions**

<details>

<summary>

### Why does IFS return #N/A?

</summary>

IFS returns #N/A when none of the tests is true, because it has no default answer. Add TRUE as the last test, followed by the value you want as the fallback, like =IFS(B2&gt;=90,"A",B2&gt;=70,"B",TRUE,"C"). Also check the order of your tests, since IFS stops at the first one that is true.

</details>

<details>

<summary>

### What is the difference between IFS and SWITCH?

</summary>

IFS tests conditions such as &gt;=70 or &lt;=5, so it fits ranges like grades and price bands. SWITCH compares one value against a list of exact matches, so it fits codes like "N" and "S". If you need to check whether something is above or below a limit, use IFS. If you are translating exact values, SWITCH is shorter.

</details>

<details>

<summary>

### Is IFS available in Excel 2016?

</summary>

Not in Excel 2016 or 2013 bought as a one-time license. IFS and SWITCH are in Excel 2019, Excel 2021 and Microsoft 365. In older versions, nest IF functions instead: =IF(B2&gt;=90,"A",IF(B2&gt;=70,"B","C")) gives the same result as the IFS grade formula.

</details>

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://excelsavvy.com/#identity","@type":"Organization","name":"ExcelSavvy","url":"https://excelsavvy.com/","logo":{"@id":"https://excelsavvy.com/#logo"}},{"@id":"https://excelsavvy.com/#website","@type":"WebSite","inLanguage":"en-US","name":"ExcelSavvy","url":"https://excelsavvy.com/","alternateName":["Excel Savvy","ExcelSavvy.com","PracticeExcel","Practice Excel Online"],"publisher":{"@id":"https://excelsavvy.com/#identity"},"workTranslation":[{"@id":"https://excelopgaver.dk/#website"},{"@id":"https://excelpraxis.de/#website"}]},{"@id":"https://excelsavvy.com/practice/ifs-switch#webpage","description":"Practice IFS and SWITCH in Excel: grades, shipping price bands, commission rates and turning codes into names, checked in a live spreadsheet.","name":"IFS and SWITCH practice: 4 exercises with answers","url":"https://excelsavvy.com/practice/ifs-switch","@type":["WebPage","CollectionPage","FAQPage"],"breadcrumb":{"@id":"https://excelsavvy.com/practice/ifs-switch#breadcrumb"},"isPartOf":{"@id":"https://excelsavvy.com/#website"},"mainEntity":[{"@id":"https://excelsavvy.com/practice/ifs-switch#/schema/question/1"},{"@id":"https://excelsavvy.com/practice/ifs-switch#/schema/question/2"},{"@id":"https://excelsavvy.com/practice/ifs-switch#/schema/question/3"}],"potentialAction":[{"@type":"ReadAction","target":["https://excelsavvy.com/practice/ifs-switch"]}],"primaryImageOfPage":{"@id":"https://excelsavvy.com/#logo"}},{"@id":"https://excelsavvy.com/practice/ifs-switch#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://excelsavvy.com","position":1},{"@type":"ListItem","name":"Excel practice exercises","item":"https://excelsavvy.com/practice","position":2},{"@type":"ListItem","name":"IFS and SWITCH practice: 4 exercises with answers","position":3}]},{"@id":"https://excelsavvy.com/practice/ifs-switch#/schema/question/1","@type":"Question","inLanguage":"en-US","name":"Why does IFS return #N/A?","acceptedAnswer":{"@type":"Answer","text":"IFS returns #N/A when none of the tests is true, because it has no default answer. Add TRUE as the last test, followed by the value you want as the fallback, like =IFS(B2>=90,\"A\",B2>=70,\"B\",TRUE,\"C\"). Also check the order of your tests, since IFS stops at the first one that is true."}},{"@id":"https://excelsavvy.com/practice/ifs-switch#/schema/question/2","@type":"Question","inLanguage":"en-US","name":"What is the difference between IFS and SWITCH?","acceptedAnswer":{"@type":"Answer","text":"IFS tests conditions such as >=70 or \u003C=5, so it fits ranges like grades and price bands. SWITCH compares one value against a list of exact matches, so it fits codes like \"N\" and \"S\". If you need to check whether something is above or below a limit, use IFS. If you are translating exact values, SWITCH is shorter."}},{"@id":"https://excelsavvy.com/practice/ifs-switch#/schema/question/3","@type":"Question","inLanguage":"en-US","name":"Is IFS available in Excel 2016?","acceptedAnswer":{"@type":"Answer","text":"Not in Excel 2016 or 2013 bought as a one-time license. IFS and SWITCH are in Excel 2019, Excel 2021 and Microsoft 365. In older versions, nest IF functions instead: =IF(B2>=90,\"A\",IF(B2>=70,\"B\",\"C\")) gives the same result as the IFS grade formula."}},{"@id":"https://excelsavvy.com/#logo","@type":"ImageObject","caption":"ExcelSavvy","contentUrl":"https://excelsavvy.com/brand/practiceexcel/icon-512.png?v=3","inLanguage":"en-US","url":"https://excelsavvy.com/brand/practiceexcel/icon-512.png?v=3"}]}
```

## Sitemap

See the full [sitemap](https://excelsavvy.com/sitemap.md) for all pages.
