# How to use IFS in Google Sheets

List condition and result pairs, and end with TRUE as the catch-all: `=IFS(B2<1,"Small",B2<5,"Medium",B2<20,"Large",TRUE,"Freight")`.

**Google Sheets:** `=IFS(B2<1,"Small",B2<5,"Medium",B2<20,"Large",TRUE,"Freight")`

**Excel:** The same IFS formula works in Excel 2019 and later. In older versions, nest IF: `=IF(B2<1,"Small",IF(B2<5,"Medium",IF(B2<20,"Large","Freight")))`.

## Example

Sample data (row 1 is the header):

| A | B | C |
| --- | --- | --- |
| Parcel | Weight (kg) | Size |
| PK-101 | 0.4 |  |
| PK-102 | 2.5 |  |
| PK-103 | 7.8 |  |
| PK-104 | 12 |  |
| PK-105 | 0.9 |  |
| PK-106 | 25 |  |
| PK-107 | 4.2 |  |
| PK-108 | 18.5 |  |

Formula in C2, filled to C9: `=IFS(B2<1,"Small",B2<5,"Medium",B2<20,"Large",TRUE,"Freight")`

Result: Small; Medium; Large; Large; Small; Freight; Medium; Large

## How it works

IFS checks the conditions in order and returns the result of the first one that is TRUE, so a 2.5 kg parcel stops at `B2<5` and never reaches the Large test. The final `TRUE,"Freight"` pair always passes, which makes it the default for everything heavier.

## Other ways

- `=IF(B2<1,"Small",IF(B2<5,"Medium",IF(B2<20,"Large","Freight")))`: Nested IF gives the same result and works in every version of both apps.

## Common mistakes

- Without the TRUE pair, a value that matches no condition returns #N/A.
- Order matters: testing `B2<20` first would label every parcel under 20 kg Large.

## Questions

**How do I use a lookup table instead?**

Put the lower bounds in a table and use `=VLOOKUP(B2,F2:G5,2,TRUE)`; changing a band then means editing a cell, not the formula.

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

SWITCH compares one value with a list of exact matches; IFS takes any conditions, such as ranges.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/use-ifs-for-several-conditions
