Google Sheets IFS With Text: Syntax, Examples, and Tips

How-to basics · Updated November 3, 2026

Google Sheets IFS With Text: Syntax, Examples, and Tips

Yes—Google Sheets’ IFS function can test text directly: put the text in double quotes in each condition, then provide the result for that condition. With a status in A2, this formula returns In progress when A2 contains Pending: =IFS(A2="Paid","Complete",A2="Pending","In progress",A2="Overdue","Follow up",TRUE,"Check status")

What IFS does with text

IFS checks a series of conditions in order and returns the value paired with the first condition that evaluates to TRUE. A condition can compare a cell with text, such as whether A2 equals Paid; the result can also be text, such as Complete. This makes the function useful for translating short codes or statuses into labels without nesting multiple IF functions.

The general pattern is a sequence of condition-and-result pairs. In Google Sheets, text values in formulas need straight double quotation marks. Cell references do not: write A2="Paid", not "A2"="Paid". The first expression refers to the cell; the second compares two pieces of literal text. If the text is typed into a formula without quotation marks, Sheets may treat it as a named range and return an error.

IFS is available in Google Sheets and in Excel versions that support the function. This page uses Google Sheets in a browser. In Sheets, enter the formula in the cell where you want the result, then press Enter. The menu path for formatting a result is Format > Number or Format > Conditional formatting, depending on what you are trying to change; neither menu is required to use IFS.

Basic syntax and a first example

Each condition must be followed by its corresponding result, and the pairs are separated by commas. The order matters: Sheets evaluates the conditions from left to right and stops at the first TRUE condition. A final fallback condition is often useful because IFS returns #N/A if none of its conditions is true.

With a delivery status in A2, the formula below classifies three known statuses and gives any other entry a clear prompt. If A2 contains Overdue, it returns Follow up; if it contains another unlisted value, it returns Check status.

With the delivery status in A2, enter: =IFS(A2="Delivered","Complete",A2="In transit","Wait",A2="Overdue","Follow up",TRUE,"Check status")

The final pair, TRUE,"Check status", is the fallback. Because TRUE is always true, it catches any value not matched earlier. Put it last; conditions placed after it will never be reached. This pattern is more informative than leaving unmatched values to produce an error, especially in a shared sheet.

Map several text values to labels

A common use is converting compact codes into readable descriptions. For example, a team might store priority codes in one column and want a fuller label in another. When the code is in B2, the formula below maps H, M, and L to labels. If B2 is M, the result is Medium priority.

With a priority code in B2, use: =IFS(B2="H","High priority",B2="M","Medium priority",B2="L","Low priority",TRUE,"Unknown code")

To apply the formula to other rows, fill it down using the small square at the selected cell’s lower-right corner, or copy and paste it into the target range. Relative reference A2 or B2 adjusts to A3 or B3 in the next row. If the source values are in a different column, update the reference before filling down.

IFS is most practical when the number of mappings is modest and the mapping rarely changes. If a list grows to dozens of codes, maintaining a separate lookup table and using a lookup function can be easier than editing a long formula. A table also makes it simpler for another person to review or update the mapping without touching formula logic.

Check for blank cells and unexpected entries

Blank input deserves an explicit decision. Without a blank check, a formula may label an empty cell as an unknown status, which can make a report look as if it contains data problems. Place the blank condition first if you want blank input to produce a blank result.

With a status in A2, this formula leaves the output empty when A2 is empty, classifies two known values, and flags anything else. When A2 is blank, the result is blank; when it contains Approved, the result is Ready.

With the status in A2, enter: =IFS(A2="","",A2="Approved","Ready",A2="Rejected","Review",TRUE,"Unrecognized status")

There is a difference between a truly empty cell and a cell containing a space. A test against an empty string may not catch a cell that looks blank because someone typed a space into it. If that occurs, clean the source data or use a formula designed to trim spaces before comparing. Also decide how to handle formula-generated empty strings in the source column; they look blank but are results of formulas.

Use text conditions beyond exact matches

Text equality checks are best when the cell should contain one known value exactly. They are not the same as wildcard matching: adding an asterisk to an equality test does not automatically mean “any text before or after.” For example, A2="*urgent*" tests for literal asterisk characters as part of the text rather than acting as a contains-search pattern.

For a case-insensitive contains check, Google Sheets users can combine SEARCH and ISNUMBER inside IFS. SEARCH returns a position when it finds the requested text, and ISNUMBER turns that position into TRUE. When A2 contains a note, the formula below returns Priority if the note includes urgent, regardless of capitalization; otherwise, it returns Standard.

With a note in A2, use: =IFS(ISNUMBER(SEARCH("urgent",A2)),"Priority",TRUE,"Standard")

SEARCH is case-insensitive. If capitalization must match exactly, use FIND in place of SEARCH. For a test that matches a full cell value while distinguishing uppercase and lowercase, use EXACT as the condition. With a response in A2, the formula below returns Confirmed only for the exact capitalization Yes; the fallback handles other entries.

With the response in A2, enter: =IFS(EXACT(A2,"Yes"),"Confirmed",TRUE,"Check response")

For criteria such as “starts with” or “contains any of several phrases,” build and test the condition separately if it becomes complicated. Combining a long text-search expression with many IFS pairs can be hard to maintain. Clear helper columns or a lookup table often make a sheet easier to audit.

Order conditions to avoid misleading results

Since IFS returns the first matching result, overlapping conditions can produce an answer different from the one a reader expects. Put the most specific condition before a broader one. For instance, if a text note can contain both the word urgent and the word review, and urgent should take precedence, test urgent first. Reversing the two conditions would return the review result for a note containing both.

For categories that are exact alternatives, order is less likely to matter because one cell cannot equal two different labels at once. For substring searches, broad tests can overlap. Keep a written rule for which category wins, then arrange the conditions to follow that rule. A final fallback makes the treatment of typos and new values explicit instead of silently leaving an error in the output.

Before copying a long IFS formula down a column, check a sample of each expected category, an empty cell, and an unexpected value. This small review catches misspellings in the formula, unexpected spaces in source data, and categories that were omitted from the mapping.

Common errors and how to fix them

  • #N/A: No condition matched. Add a final fallback pair such as TRUE,"Other", or review whether the input text differs from the expected wording.
  • Formula parse error: Check that every condition has a result, parentheses are balanced, and text is enclosed in straight double quotes. Some spreadsheet locales use semicolons rather than commas as formula separators; use the separator expected by the sheet’s locale.
  • A value falls into the fallback unexpectedly: Check spelling, spaces before or after the text, and punctuation. The values may look alike while containing different characters.
  • Wrong label appears: Review the condition order, especially if conditions use SEARCH or another contains test that can overlap.
  • Formula shows as text: The cell may be formatted as plain text, or an apostrophe may precede the equals sign. Change the cell format if needed and re-enter the formula.

For comparisons that should ignore accidental leading or trailing spaces, a TRIM-based condition can help. However, trimming does not correct every data-quality issue: it does not make a misspelled status equal to the intended status. Whenever a source column is manually entered, a dropdown created through Data > Data validation can reduce spelling variations at the point of entry.

IFS compared with IF and lookup formulas

Use IFS when you have several separate conditions and want a readable list of outcomes. A chain of nested IF functions can do similar work, but each new case adds another level of nesting, making the formula harder to inspect. IFS lays out condition-result pairs in sequence, although a very long IFS can still be difficult to maintain.

Use a lookup table when the relationship is a stable list of input values and output labels that may change over time. This separates the data from the formula and lets a maintainer edit a label in one place. Use IF when there are only one or two branches, or when a decision depends on a simple true-or-false test. For text that must be searched for a phrase rather than compared exactly, combine IFS with a search condition or choose a dedicated text-processing approach.

Google Sheets and Excel both provide IFS, and the basic text-comparison examples here work in both. Google Sheets has functions such as REGEXMATCH that are not Excel functions, so formulas using them are not directly portable to Excel. Conversely, Excel version availability can vary for newer functions. If a workbook must move between products, favor shared functions and check the target app’s function support.

Frequently Asked Questions

Does IFS in Google Sheets work with text?
Yes. Compare a cell to text in double quotes, such as A2="Open", and pair that condition with the result you want. The result can also be text.

Do text values in an IFS formula need quotation marks?
Yes. Put literal text in straight double quotes. Cell references such as A2 are written without quotes, while a literal empty string is written as "".

What happens if no IFS condition is true?
Sheets returns #N/A. Add a final always-true condition such as TRUE with a fallback result to handle unmatched text deliberately.

Can IFS match part of a text string?
Not through a wildcard in a simple equality comparison. For a contains test, use a condition such as ISNUMBER(SEARCH("word",A2)); SEARCH is case-insensitive. Put that condition inside an IFS pair and include a fallback.

Is IFS case-sensitive?
Ordinary text equality comparisons generally treat uppercase and lowercase as equivalent. Use EXACT when capitalization must match, or FIND rather than SEARCH for a case-sensitive substring search.

Why does my formula return the wrong category?
IFS selects the first true condition. Check the order for overlapping tests, then inspect the source text for extra spaces, different punctuation, or a spelling variation.

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.