Yes. In Excel, use greater-than and less-than operators directly inside an IFS logical test, such as A2>10 or A2<20. IFS checks its tests in order and returns the result paired with the first test that is true, so the order of your conditions matters.
How IFS handles greater-than and less-than tests
The IFS function is useful when you want to assign a label or result based on several possible conditions. Each condition is a logical test, and each test is followed by the value Excel should return if that test is true. You can use comparison operators such as > (greater than), < (less than), >= (greater than or equal to), and <= (less than or equal to).
For example, with a score in A2, the formula below classifies values above 100, below 100, or exactly equal to 100. If A2 contains 75, the result is “Below 100.”
With the score in A2: =IFS(A2>100,"Above 100",A2<100,"Below 100",A2=100,"Exactly 100")
Excel evaluates the tests from left to right and stops at the first true one. The function is available in Microsoft 365 and Excel 2019 or later. Its basic behavior is the same in Excel for Windows, Mac, and the web; formula separators can differ if your regional settings use semicolons instead of commas.
Build ranges by ordering the conditions
For a set of ranges, arrange the tests so that a value cannot accidentally match an earlier, broader condition. A common approach is to list cutoff tests from low to high. The following formula puts a number into one of five bands. If A2 contains 64, the result is “50 to under 80.” A value of 50 goes into that same band, while 80 goes into “80 to 100.”
With the number to classify in A2: =IFS(A2<0,"Negative",A2<50,"Under 50",A2<80,"50 to under 80",A2<=100,"80 to 100",TRUE,"Over 100")
This pattern works because the second test, A2<50, is reached only if the value was not negative. The third test is reached only if the value was not below 50. You do not need to repeat both ends of every interval when earlier tests have already excluded the lower values.
Alternatively, you can test the highest threshold first. That is often easier for grading scales, where each result represents a minimum score. With a score in B2, 84 returns “B”; 90 or higher returns “A.”
With the score in B2: =IFS(B2>=90,"A",B2>=80,"B",B2>=70,"C",B2>=60,"D",TRUE,"F")
In this descending pattern, a score of 95 satisfies the first test and is classified as A. A score of 84 fails the first test but satisfies the second, so Excel returns B. If you put B2>=60 first, every score of 60 or more would be classified as D before Excel could check the higher cutoffs. This is why condition order is not just a formatting choice.
Understand strict and inclusive boundaries
The difference between > and >=, or between < and <=, determines what happens exactly at a cutoff. “Greater than 10” excludes 10; “greater than or equal to 10” includes it. Likewise, “less than 20” excludes 20, while “less than or equal to 20” includes it.
When you design adjacent bands, decide which band owns each boundary before writing the formula. For example, “10 to under 20” includes 10 but excludes 20. To make that range explicit, use AND to require both conditions to be true. With a measurement in A2, the result for 15 is “10 to under 20,” while 20 does not match that band.
With the measurement in A2: =IFS(AND(A2>=10,A2<20),"10 to under 20",AND(A2>=20,A2<30),"20 to under 30",TRUE,"Outside these ranges")
Using both endpoints can make a formula easier to audit, especially when ranges are separated by gaps or have special rules. The trade-off is that the formula is longer. If your conditions form a continuous set of bands, ordered one-sided tests are often shorter and just as clear.
Combine comparisons with AND and OR
A single IFS test can also combine more than one requirement. Use AND when every requirement must be true, such as a value being at least 10 and below 20. Use OR when any one of several alternatives is enough. These functions go inside the logical-test position of IFS.
For example, suppose A2 contains a temperature and the label “Check” should appear below 0 or above 35. A temperature of 36 returns “Check”; a temperature of 20 returns “Normal.”
With the temperature in A2: =IFS(OR(A2<0,A2>35),"Check",TRUE,"Normal")
Keep the logical structure in mind: AND joins conditions that must all hold, while OR joins alternatives. If you need a result for one exact value and a different result for a range, put those tests in the appropriate order and ensure that broad tests do not capture values meant for a more specific rule.
Provide a fallback for values that do not match
IFS returns #N/A if none of its logical tests is true. A final test of TRUE is a convenient catch-all: because it is always true, Excel returns its paired value whenever it reaches that final pair. This can supply a label such as “Other,” a zero, or a message that prompts someone to check the input.
For example, with a status in A2, the formula returns “Complete” for that exact text and “Review” for any other value, including an empty cell. If you want blanks to remain blank instead, handle that case first.
With the status in A2: =IFS(A2="Complete","Complete",TRUE,"Review")
With the status in A2 and a blank intended to produce a blank result: =IFS(A2="","",A2="Complete","Complete",TRUE,"Review")
A fallback is particularly useful when new or unexpected values may appear in a source list. It prevents a no-match error from appearing in a report, but choose the fallback carefully: returning “Other” can be clearer than returning 0 if zero could be mistaken for a real measurement. Excel allows up to 127 condition-and-result pairs in one IFS function, though a very long list can become difficult to maintain.
Check the values being compared
Comparison formulas depend on the contents of the cells, not just on how those cells look. A number formatted to display with no decimal places may still contain a fractional value. For example, a cell displayed as 10 might actually contain 9.6, so a test against 10 can produce a result that seems surprising. Check the underlying value in the formula bar or adjust the source data if the rule is meant to use rounded values.
Numbers stored as text are another common source of confusion. A cell may look like a number but be treated as text, particularly after importing data. Convert the source to numeric values before relying on numeric cutoffs; changing the cell’s number format alone does not necessarily convert text into numbers. Dates are also values in Excel: a date comparison works against the date value stored in the cell, so make sure the input is a genuine date and the cutoff represents the intended date.
For troubleshooting, check these points before rewriting the formula:
- Confirm that the source cells contain numbers or dates rather than text that only looks numeric.
- Check whether the cutoff should include equality by choosing
>versus>=, or<versus<=. - Review the condition order for an earlier test that could capture the value first.
- Add a final fallback if unmatched inputs are possible, and decide what that fallback should communicate.
- Check whether blank cells should be treated as blank, as zero, or as an input requiring review.
If Excel displays a formula error immediately after entry, check that the parentheses and quotation marks are paired and that your Excel regional settings accept commas as argument separators. In some locales, Excel expects semicolons. The examples here use commas, as in a standard English-language Microsoft 365 installation on Windows.
Choose IFS, IF, or a counting function
IFS is a readable alternative to deeply nested IF functions when each condition maps to one result. A nested IF can express the same kind of decision, but each new branch sits inside another function, which makes long formulas harder to inspect. IFS places the tests and their corresponding results in a sequence. It is not automatically the best choice for every task: a short two-way decision may be clearer with a regular IF, while a lookup table may be easier to update when many thresholds change.
Also distinguish classification from counting. IFS returns one result for the current row; it does not count how many cells meet a condition. If you want to count numbers above 10 in A2:A20, use COUNTIF instead. With the values to count in A2:A20, this formula returns 3 if exactly three cells contain values greater than 10.
With the values to count in A2:A20: =COUNTIF(A2:A20,">10")
The comparison in a COUNTIF criterion is written as text inside quotation marks. That differs from an IFS logical test, where the comparison is written directly against a cell reference. Use the function that matches the question: a label for each row, a count across a range, or a lookup from a maintained set of thresholds.
Enter and maintain an IFS formula
In Excel for Microsoft 365 on Windows, select the cell where you want the result, type the formula, and press Enter. To use the same rule for additional rows, use relative references such as A2, then fill the formula down; Excel changes the reference to A3, A4, and so on. You can drag the fill handle at the bottom-right corner of the selected cell or copy and paste the formula into the target range.
Before filling a formula down a large table, test values at every boundary and at least one value outside the intended range. For the score bands, useful checks include 59, 60, 69, 70, 79, 80, and 90. These test whether equality is assigned to the intended band and whether no range is accidentally skipped. If the cutoffs or labels change often, consider storing them in a small, clearly labeled table and using a lookup approach; that can be easier to maintain than editing a long chain of conditions.
Frequently Asked Questions
Can I use greater than and less than in IFS?
Yes. Put a comparison such as A2>10, A2<20, A2>=10, or A2<=20 in a logical-test position. Excel checks each test in order and returns the result paired with the first true test.
Does IFS check every condition?
It evaluates the conditions in order and returns the result for the first true condition; later conditions do not determine the returned result. Put the most specific or highest-priority rules first, and avoid placing a broad condition ahead of a rule that needs to take precedence.
Why does my IFS formula return #N/A?
That usually means none of the supplied tests was true. Add a final catch-all test such as TRUE paired with an appropriate result, or revise the conditions so that they cover the valid inputs you expect.
How do I test a value between two numbers?
Use AND inside the test when both endpoints matter. For example, a range from 10 up to but not including 20 uses the conditions “at least 10” and “less than 20.” Decide explicitly whether the endpoints should be included.
Can I use IFS in older versions of Excel?
IFS is available in Excel 2019 and later, including Microsoft 365. In an older version that does not support it, use nested IF functions or another formula structure supported by that version.
Related
- Excel Accounting Solver: What It Does and How to Use It
- Excel Budget Spreadsheet Free? Find Templates and Tips
- Excel Accounting Format: How It Works and When to Use It Properly
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel Date Subtraction: Formulas, Days, and WorkdaysTo subtract one date from another in Excel, subtract the earlier date cell from the later one: if…
- XLOOKUP Example Sheet: Formula, Setup, and TipsAn XLOOKUP example sheet can find a value in one column and return the matching value from another.…
- Power Query XLOOKUP From Another Table: How It WorksPower Query does not run the Excel XLOOKUP function inside a query. To return columns from another table,…
- How to Merge Names in Excel: Formulas and Flash FillTo combine first and last names in Excel, put the first names in column A and last names…
- Excel Formula for the Tab Name: Get the Worksheet NameYes. In Excel for Microsoft 365 on Windows, enter =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255) in a cell on the worksheet whose name…
- Excel AND in MATCH: Find Rows With Multiple CriteriaTo use AND conditions with Excel MATCH, compare each criteria range with its requested value and multiply the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.