Google Sheets IFS Function: Syntax and Examples

How-to basics · Updated November 3, 2026

Google Sheets IFS Function: Syntax and Examples

Google Sheets’ IFS function checks conditions in order and returns the value paired with the first condition that is TRUE. Use it to replace a long chain of nested IF functions; include a final TRUE condition if you want a default result when none of the earlier conditions match.

What the IFS Function Does

IFS is useful when one cell’s value needs to be classified into several possible outcomes. For example, you might assign letter grades from scores, label orders by size, or decide which message to show based on a set of rules. Instead of embedding one IF inside another, you list each condition and its corresponding result as a pair.

The order of those pairs matters. Sheets evaluates the conditions from left to right and returns the result attached to the first condition that is TRUE. It does not keep searching for a later, more specific match after it has found one. A well-designed formula therefore puts rules in an order that gives the intended result.

IFS returns the result as written: that might be text, a number, a date, or another formula’s result. It does not automatically add labels, apply number formatting, or change the source cell. Those are separate spreadsheet tasks.

Syntax and Arguments

The function’s general syntax is IFS(logical_expression1, value_if_true1, [logical_expression2, value_if_true2, ...]). The first argument in each pair is a condition that evaluates to TRUE or FALSE; the next argument is what Sheets should return if that condition is TRUE. Continue adding condition-and-result pairs as needed.

  • Logical expression: A test such as whether a score is at least 90, a status equals “Paid,” or a date is before a deadline.
  • Value if true: The result for that condition. It can be quoted text, a number, a cell reference, or a calculation.
  • Optional additional pairs: Add these in the order Sheets should check them. Each condition must have a matching result.

The square brackets in the syntax indicate optional arguments; do not type the brackets into the formula. The function needs at least one complete pair. If the number of arguments is odd, or a condition is missing its result, Sheets will report a formula error.

How to Write an IFS Formula

To build a formula, first decide which outcomes are possible, then translate each rule into a condition-result pair. In Google Sheets in a web browser, click the cell where the answer should appear, type an equals sign followed by IFS, and add the pairs separated by commas. Press Enter to calculate the result. You can also start typing =IFS( and use the function suggestion or help panel to review the argument pattern.

  1. Identify the input cell that the rule should evaluate.
  2. Write the conditions in the order they should take priority.
  3. Place each desired result directly after its condition.
  4. Decide what should happen if no condition matches, and add a default pair if appropriate.
  5. Test the formula with values near each boundary, not only with a typical value.

For instance, a score of 90 belongs in the 90-and-above category, while a score of 89 belongs in the next category down. Testing both values helps reveal a mistaken greater-than sign or a gap between ranges.

Example: Assigning Letter Grades

Suppose scores are in A2:A and the grade should appear in B2. The following rule assigns A to 90 or higher, B to 80 or higher, C to 70 or higher, D to 60 or higher, and F to any remaining score. With a score of 87 in A2, this formula returns B:

With the score in A2, enter this in B2: =IFS(A2>=90,"A",A2>=80,"B",A2>=70,"C",A2>=60,"D",TRUE,"F").

The final TRUE acts as the default because it is always true. It is reached only if all the earlier score tests fail. For example, a score of 73 fails the 90 and 80 tests, then meets the 70 test, so the result is C. A score of 58 reaches the final pair and returns F. This arrangement also handles low scores without needing to write a separate condition such as “less than 60.”

For a real grading policy, confirm what should happen with missing scores, scores above the normal scale, and any special exceptions. The formula reflects the rules you supply; it cannot determine whether a school’s grading thresholds are appropriate.

Example: Applying Sales Tiers

IFS can return a numeric rate as well as a text label. Imagine the sales amount is in A2 and the rate is 10% for sales of at least 10,000, 7% for at least 5,000, 4% for at least 1,000, and zero below 1,000. With 6,500 in A2, the formula returns 0.07, which represents 7%:

With the sales amount in A2, use: =IFS(A2>=10000,0.1,A2>=5000,0.07,A2>=1000,0.04,TRUE,0).

Because the result is numeric, you can format the result cell as a percentage using Format > Number > Percent. That changes how the value is displayed, not the underlying calculation. If you multiply sales by the returned rate elsewhere, 6,500 multiplied by 0.07 is 455. This is only an illustration of spreadsheet arithmetic, not financial or compensation advice; check the actual terms and applicable rules before relying on a real payment calculation.

Notice why the thresholds are listed from largest to smallest. If the 1,000 condition came first, a sale of 6,500 would already satisfy it, and Sheets would return 4% without checking the higher tiers. For descending minimum thresholds, start with the highest minimum.

Combining Conditions and Handling Blanks

A condition can combine tests. For example, a pass label might require both a score of at least 80 and completed homework. Assume the score is in B2 and the homework status in C2, written as Yes or No. With a score of 86 and No in C2, the first condition fails and the formula returns Review because the score still meets the second condition:

With the score in B2 and homework status in C2, enter: =IFS(AND(B2>=80,C2="Yes"),"Pass",B2>=80,"Review",TRUE,"Retake").

AND makes the first condition true only when both tests are true. The second condition then catches a student who meets the score threshold but has not completed the work. Anyone below 80 reaches the default result. If the source data uses different wording, such as “Complete,” the condition must use that exact text.

Blank input cells deserve attention. A blank cell can behave like a zero in some comparisons, so a threshold-based formula may assign a low category instead of leaving the output empty. To keep the result blank until a score is entered, wrap the classification in an IF. With a score in A2, this returns an empty display for a blank A2 and C for a score of 74:

With the score in A2, enter this in the result cell: =IF(A2="","",IFS(A2>=90,"A",A2>=80,"B",TRUE,"C")).

That blank check is useful when a sheet has many prefilled formulas and should look empty until users enter data. If zero is a valid score, it remains distinct from a truly empty input under this check and will be classified by the IFS rules.

Common Errors and Troubleshooting

The most frequent IFS problem is #N/A. It appears when every supplied condition evaluates to FALSE and the formula has no catch-all condition. Add a final pair such as TRUE,"Other" or TRUE,0 if a default is suitable. Choose the default deliberately: a generic result can conceal unexpected values that might be better flagged for review.

  • Wrong category: Check the order of conditions. A broad condition placed before a narrower one can capture values prematurely.
  • Formula parse error: Check that every condition has a result, parentheses are balanced, text is enclosed in straight double quotes, and arguments use the separators expected by the spreadsheet’s locale.
  • Unexpected text mismatch: Check spelling and spaces in both the data and the quoted criterion. “Paid” and “Paid ” may not behave as you intend.
  • Boundary values misclassified: Decide whether a threshold includes its endpoint. Use operators such as >= for “at least” and > for “greater than.”
  • Number stored as text: If imported values look like numbers but compare unexpectedly, check whether the cells contain text rather than numeric values.

Google Sheets’ formula separators can depend on spreadsheet locale settings. If a formula copied from a comma-based example produces a parse error, check File > Settings and the spreadsheet’s locale. Some locales use semicolons between function arguments. That is a regional syntax difference, not a different IFS rule. Also make sure quotation marks are straight quotes rather than typographic curly quotes copied from formatted text.

IFS Compared with IF and SWITCH

Use IFS when you have several independent conditions with different tests, especially ranges such as “at least 90,” “at least 80,” and “at least 70.” It is usually easier to scan than deeply nested IF calls because each condition sits beside its result. A nested IF can still be useful when only one or two branches are needed or when a calculation must explicitly handle both the true and false paths at each step.

SWITCH is often a better fit when one expression is being compared with a list of exact values, such as mapping the text status “New,” “Open,” or “Closed” to a label. It is not a direct replacement for range tests: IFS can test inequalities and combine conditions, while SWITCH is organized around matching an expression to listed cases. For either function, plan a fallback for values that do not match if an error or blank is not the desired outcome.

These functions also exist in Excel, but this page’s syntax and instructions are for Google Sheets in a browser. Excel’s IFS function is available in current Microsoft 365 versions and supported modern Excel releases; older Excel versions may not recognize it. Function availability and locale-specific separators can vary, so check the target spreadsheet application before sharing formulas across platforms.

Frequently Asked Questions

Does Google Sheets IFS need a default value?
No. A default is optional, but if every condition is FALSE and no final catch-all is provided, the function returns #N/A. Add a last condition of TRUE with the result you want for unmatched cases.

Can I use more than two conditions in IFS?
Yes. Add as many condition-and-result pairs as the rules require, keeping each pair together and arranging them in priority order. Make sure the final condition accounts for cases that otherwise would not match, if that is important for the sheet.

Why does IFS return the wrong result for my ranges?
The conditions may be in the wrong order, or the boundary operators may not match the intended rules. Test values just below, exactly at, and just above each threshold to identify overlaps or gaps.

Can IFS check more than one thing at a time?
Yes. Use a logical test such as AND when all conditions must be true, or OR when at least one must be true. Put the combined test and its result together as one IFS pair.

How is IFS different from nested IF?
IFS lists condition-result pairs in sequence, which is often clearer when there are several branches. Nested IF places one IF inside another and can be more cumbersome to read, but it remains useful for simpler branching or when each IF needs a distinct false-path calculation.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.