In Google Sheets, IFS checks conditions in order and returns the result for the first condition that is true. Use it when a formula needs to choose among several outcomes, such as assigning a grade, labeling a status, or applying different thresholds; add TRUE as the final condition if you want a fallback result.
What the IFS function does
IFS is a conditional function: it lets one formula test a series of rules without nesting multiple IF functions inside one another. Each rule is a pair: a condition to evaluate, followed by the value to return if that condition is true. The function checks the pairs from left to right and stops at the first true condition.
That order matters. If more than one condition could be true, Sheets does not compare the possible results or choose the most specific one automatically. It returns the value belonging to the earliest true condition. A well-built IFS formula therefore puts the rules in the intended priority order.
IFS is useful for a finite set of outcomes. For example, a score can map to a letter grade, or an order status can map to a shorter label. It is not a replacement for every kind of lookup: if a long table of thresholds or categories changes regularly, keeping the rules in cells and using a lookup formula may be easier to maintain.
How to write an IFS formula
Start by deciding what each condition should test and what the corresponding result should be. Then enter the condition and result in alternating order inside IFS. Continue adding pairs for each rule. The number of conditions and results must match, so an incomplete pair can cause an argument error.
For example, with a value in A2, a condition might check whether A2 is at least 90, and its paired result might be the text label A. A later condition can check a lower threshold. Conditions can compare numbers, text, dates, or the output of other functions. Results can be text, numbers, cell references, or calculations.
To make the formula, select the cell where you want the result, type an equals sign followed by IFS and its paired arguments, then press Enter. Google Sheets displays the result in that cell. To use the same rule for other rows, fill or copy the formula down, and confirm that the references adjust as intended.
Example: assign grades from scores
Suppose student scores are in A2:A20 and the grade should appear beside each score. Put the formula in B2. This example checks the highest threshold first, then works down; the last pair provides a fallback for scores below 70 or for a blank cell.
With the score in A2, the formula returns B when A2 contains 84. It returns Needs review for a score below 70 or for a blank, because a blank does not meet the numeric thresholds in this example.
=IFS(A2>=90,"A",A2>=80,"B",A2>=70,"C",TRUE,"Needs review")
The TRUE condition is always true, so it functions as a final catch-all. Any valid input that did not match an earlier condition receives the fallback text. If you leave off that final pair and no earlier condition is true, IFS returns the #N/A error instead.
Order rules from most specific to broadest
Overlapping rules are a common source of surprising results. If you test “score is at least 70” before “score is at least 90,” a score of 95 meets the first condition and never reaches the higher threshold. Put the highest threshold first when higher values deserve a distinct category.
The same principle applies to status rules. A formula that checks whether a value is greater than zero before checking whether it is greater than 100 will categorize 150 under the first rule. When designing IFS, ask whether a value could satisfy two rules. If it could, decide which one should win and place that condition first.
- For descending cutoffs, list the largest cutoff first.
- For ascending cutoffs, make sure earlier ranges do not accidentally include values meant for later ranges.
- For text categories, use conditions that distinguish the intended labels and provide a final outcome for unexpected entries.
Ranges can also have explicit upper and lower limits. For example, a middle band can require a value to be at least 70 and less than 90, rather than relying only on the order of other conditions. Explicit boundaries can make a complicated rule easier to review.
Combine conditions with AND and OR
An IFS condition does not have to test just one thing. Google Sheets supports AND when every requirement must be met and OR when at least one requirement is enough. These functions go inside the condition position; their paired IFS result still comes after the condition.
For instance, suppose a score is in B2 and a completion status is in C2. The first rule below requires a score of 90 or more and the exact status “Complete.” If the score reaches 90 but the status is different, the second rule returns a reminder. With B2 equal to 93 and C2 equal to “Pending,” the result is Check status.
=IFS(AND(B2>=90,C2="Complete"),"Ready",B2>=90,"Check status",TRUE,"In progress")
Keep the broad fallback last, because TRUE will match every case that reaches it. If the logic has many combinations, split it into helper columns or use a clearly structured lookup table. A single formula can be technically correct yet difficult for another person to audit.
Using text, dates, and fallback results
For text labels, put text results in double quotation marks. A text condition can compare a cell with a label such as “Open” or “Closed.” If your data may contain extra spaces, inconsistent spelling, or unexpected labels, account for those possibilities rather than assuming every row uses one of the expected values. A fallback such as “Review” can expose values that need attention.
Dates in Sheets are stored as date values, so comparisons can use date thresholds. Using DATE to construct a threshold avoids ambiguity about how a typed date string is interpreted. With a date in A2, the formula below labels dates before 2026, dates within 2026, and dates from 2027 onward. A2 containing May 15, 2026 returns 2026.
=IFS(A2<DATE(2026,1,1),"Before 2026",A2<DATE(2027,1,1),"2026",TRUE,"2027 or later")
Think carefully about blanks. In the grade example, a blank falls through to the fallback. If a blank should instead produce an empty cell, make that the first rule, before the numeric tests. This prevents a blank from being mislabeled as a low score.
With a score in A2, this version returns an empty result when A2 is blank and otherwise applies the grade bands. The first condition is deliberately checked before the thresholds.
=IFS(A2="","",A2>=90,"A",A2>=80,"B",A2>=70,"C",TRUE,"Needs review")
Common IFS errors and how to fix them
#N/A usually means none of the supplied conditions evaluated to true. Check whether the rules cover all expected inputs. If they do not, add a deliberate final condition and result, often TRUE followed by a fallback label. That is usually clearer than letting an unexplained error appear in the sheet.
An argument error can indicate a missing condition or result, an unmatched parenthesis, or a separator problem. In many Google Sheets locales, formulas use semicolons instead of commas between arguments. The examples here use commas; if Sheets rejects a formula, check the spreadsheet’s locale and use the separator it expects. This is a regional syntax difference, not a different IFS rule.
If the result is unexpected, inspect the order of the conditions and the underlying cell values. A number stored as text may not behave like a numeric score, and a date entered as text may not compare like a true date value. Also check for spaces or different labels in text cells. Test representative boundary values, such as 69, 70, 89, and 90 for the grade example, to confirm that every cutoff behaves as intended.
For a formula copied down a column, check relative references too. A reference such as A2 normally changes to A3 in the next row, which is desirable for row-by-row classification. If a condition must always refer to one fixed cell, use an absolute reference such as $A$2.
IFS compared with IF and SWITCH
Use IF when there are only two outcomes, such as “Pass” or “Fail.” Multiple nested IF functions can express many branches, but the structure becomes harder to read as cases accumulate. IFS keeps a series of condition-and-result pairs in one function and can be easier to scan when each case has a different logical test.
SWITCH is a better fit when one expression is being compared with several exact alternatives, such as a cell containing “North,” “South,” or “West.” IFS is more flexible for ranges and combined tests, such as “at least 90” or “score is high and status is complete.” These functions serve different shapes of logic rather than making one universally preferable.
For a long or frequently edited set of categories, consider putting the rules in a small table and using a lookup approach instead of embedding every rule in one formula. A table makes the thresholds visible as data and can be simpler to update, especially when multiple sheets use the same mapping.
Frequently Asked Questions
Does Google Sheets IFS need a final TRUE condition?
No. It is optional, but useful when you want a defined result if no earlier condition is true. Without a matching condition, IFS returns #N/A. A final TRUE condition acts as the fallback.
What does IFS return when multiple conditions are true?
It returns the result paired with the first true condition, reading from left to right. Put the condition with the highest priority first to avoid a broader rule capturing the value prematurely.
Can I use IFS to check whether a cell is blank?
Yes. Add a blank check as a condition, such as comparing the cell with an empty string, and place it before rules that would otherwise classify the cell. Decide whether a blank should display an empty result or a message.
Why does my IFS formula show #N/A?
None of the conditions matched. Confirm that the conditions cover the input range and check whether the cell contains the expected type of value. Add a fallback pair if unmatched values should receive a label instead of an error.
Is IFS in Google Sheets different from IFS in Excel?
The basic purpose and condition-result pattern are similar in Google Sheets and modern Excel. The interface differs because this article describes Sheets in a web browser, and formula argument separators can vary with locale. Excel versions and regional settings may also affect what is available or accepted in a workbook.
Related
- Insert Key in Excel: What It Does and How to Use It Safely
- How to Link a Word to a Website in Microsoft Excel
- How to Find Duplicate Values in Excel: Step-by-Step
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Google Sheets SUMIF: Syntax, Examples, and Common FixesTo add values in Google Sheets only when matching cells meet a condition, use SUMIF. For example, if…
- Merge Cells Horizontally in Google Sheets: Steps and TipsTo merge cells horizontally in Google Sheets, select the cells you want to combine, then choose Format >…
- Export Outlook Contacts to PST: Steps and OptionsYes. In classic Outlook for Microsoft 365 on Windows, go to File > Open & Export > Import/Export,…
- Outlook Email Preview: Change Lines and Reading PaneTo change the email preview in Outlook, adjust the message-preview lines to show more or less text in…
- How to Set Up Auto Forwarding in OutlookTo automatically forward incoming Outlook email, open Settings, go to Mail > Forwarding, enable forwarding, enter the destination…
- Google Sheets Apps Script Extension: Setup and UseGoogle Apps Script is built into Google Sheets; you do not need to install a separate extension to…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.