In Excel, use > to test whether a value is greater than another and < to test whether it is less. If A2 contains 85 and B2 contains 70, enter =A2>B2 in another cell; the result is TRUE. The same comparison works with numbers, dates, and cell references, and you can combine it with functions such as IF and COUNTIF.
What greater than and less than mean in Excel
Greater-than and less-than are comparison operators. They compare two values and return one of Excel’s logical results: TRUE or FALSE. That result can be displayed in a cell, used to decide which value a formula returns, or passed into another function.
The symbols can be easy to mix up: the open end points toward the larger value. Thus, > means “is greater than,” while < means “is less than.” Excel does not require spaces around either operator, though adding spaces can make a long formula easier to read.
For instance, when a sales figure is above a target, a comparison can return TRUE; if it is below the target, it returns FALSE. The formula does not change the values being compared. It simply evaluates the relationship between them.
Excel comparison operators at a glance
Excel has six basic comparison operators. Greater than and less than are often used alongside the inclusive versions, which also count a value equal to the comparison point.
>means greater than, but not equal to.<means less than, but not equal to.>=means greater than or equal to.<=means less than or equal to.=means equal to.<>means not equal to.
The distinction between a strict and inclusive comparison matters at a boundary. If a minimum qualifying score is 70, a score of exactly 70 fails a test using greater than, but passes one using greater than or equal to. Decide whether the boundary itself should count before choosing the operator.
Basic formulas with cell references and numbers
With a measured value in A2 and a limit in B2, the formula =A2<B2 returns TRUE when A2 is smaller than B2. If A2 is 12 and B2 is 15, the result is TRUE. If the values are equal, it is FALSE, because “less than” does not include equality.
With a price in A2 and a maximum budget of 100 stored in B2, =A2<=B2 returns TRUE for a price of 100 or less. If A2 is 100, the result is TRUE; if A2 is 100.01, it is FALSE. A value can also be compared directly with a number: assuming A2 contains 72, =A2>70 returns TRUE. Using a cell reference for the limit is often more convenient because you can adjust the threshold without editing the formula.
For a single comparison, type the formula in a blank cell and press Enter. Excel will show TRUE or FALSE. If you see a result that looks like text or a number instead, check that the formula begins with an equals sign and that the operator is in the formula rather than entered as part of a text string.
Use IF to return a label instead of TRUE or FALSE
A comparison is useful on its own, but an IF formula can turn the result into a message or category. With a score in A2 and a pass mark in C1, use =IF(A2>C1,"Pass","Review"). If A2 is 72 and C1 is 70, the formula returns Pass. If A2 is 70, it returns Review because the test uses strict greater than.
If a score equal to the pass mark should count, change the test to greater than or equal to. With the same layout, =IF(A2>=C1,"Pass","Review") returns Pass when both cells contain 70. The two text results are in quotation marks because they are text values; cell references and comparison operators are not.
You can also test whether a value falls inside a range. With a number in A2, the formula =AND(A2>10,A2<20) returns TRUE only when A2 is greater than 10 and less than 20. A value of 15 returns TRUE, while 10 and 20 each return FALSE. For a range that includes both endpoints, use the inclusive operators in both comparisons.
Count or sum values above and below a threshold
Use COUNTIF when you want to count cells that meet a condition rather than test just one value. If scores are in B2:B10, =COUNTIF(B2:B10,">70") counts scores strictly above 70. A score of exactly 70 is not included. To count 70 and above, change the criterion to ">=70".
A criterion that refers to a cell needs to be joined to the operator with an ampersand. If the values are in B2:B10 and the threshold is in D1, =COUNTIF(B2:B10,">"&D1) counts values greater than the current contents of D1. For example, if D1 contains 70, this counts values above 70. This approach lets you change the threshold without rewriting the criterion.
SUMIF can add related values from another range when a comparison is met. With qualifying scores in A2:A10, corresponding amounts in B2:B10, and the threshold in C1, =SUMIF(A2:A10,">"&C1,B2:B10) adds the amounts in B2:B10 for rows where the value in column A is greater than C1. The criteria range and sum range should cover matching rows.
To count values inside a range, COUNTIFS can apply a lower and upper condition at once. With values in A2:A100, the inclusive lower limit in D1, and the inclusive upper limit in E1, =COUNTIFS(A2:A100,">="&D1,A2:A100,"<="&E1) counts values from D1 through E1, including both endpoints. COUNTIFS requires each criteria range to have the same dimensions.
Comparisons involving dates, text, and blanks
Excel stores valid dates as serial numbers, so greater-than and less-than can compare dates chronologically. With a date in A2, the formula =A2>DATE(2025,1,1) returns TRUE if A2 is later than January 1, 2025. If A2 contains January 2, 2025, the result is TRUE. DATE constructs a date from year, month, and day, avoiding ambiguity between regional date formats.
Make sure the compared entries are real Excel dates, not text that merely looks like a date. A cell’s display format can make a number look like a date, but formatting alone does not convert text into a usable date value. If a comparison gives an unexpected result, inspect the cell contents and check whether Excel recognizes them as dates.
Text comparisons can also be made, but they may not match a reader’s idea of alphabetical order in every situation. In ordinary worksheet comparisons, text matching is not case-sensitive: uppercase and lowercase versions of the same word generally compare as equal. If you need a case-sensitive test, use a function designed for that purpose, such as EXACT, rather than relying on a greater-than or less-than comparison.
Blank cells deserve attention in numeric tests. A blank may behave like zero in some calculations, which can make a threshold test appear to include an empty row. If A2 may be blank and you only want to test actual entries above 100, use =AND(A2<>"",A2>100). When A2 is blank, the first test is FALSE, so the combined result is FALSE; when A2 is 120, it is TRUE.
Highlight values with conditional formatting
If the goal is to spot values visually rather than calculate a TRUE or FALSE result, use conditional formatting. Select the cells, then choose Home > Conditional Formatting > Highlight Cells Rules > Greater Than. Enter the threshold, choose a formatting style, and confirm. Excel will highlight qualifying cells in the selected range. The corresponding Less Than rule highlights values below a threshold.
For a threshold that changes regularly, you can base a conditional-formatting rule on a cell value rather than typing a fixed number into the rule. The exact dialog labels can vary slightly by Excel release, but the rule is still applied to the range you selected. Check that the selection covers all intended rows; otherwise, the formatting may appear to work only on part of the data.
Conditional formatting changes how cells look, not the underlying values or the result of a formula. It is a useful alternative when the purpose is visual scanning, while IF, COUNTIF, or SUMIF is more appropriate when you need a result to use elsewhere in a workbook.
Common mistakes and how to fix them
- Using the wrong boundary: Choose
>or<to exclude equality, and>=or<=to include it. Test a value exactly on the limit to confirm the rule. - Putting a number criterion in the wrong form: COUNTIF criteria are supplied as text, such as
">70". When the threshold is in a cell, join the text operator and the reference with&. - Comparing numbers stored as text: A cell containing text that looks like 75 may not behave like the numeric value 75. Convert the source data to numbers where appropriate, or use a conversion function deliberately. With a text-form number in B2,
=VALUE(B2)>70returns TRUE if B2 contains the text 75. - Expecting a formatted number to be rounded: Number formatting changes the display, not the stored value. If A2 contains 1.234 and B2 contains 1.23, a direct comparison still uses those underlying values. To compare after rounding to two decimal places, use
=ROUND(A2,2)>ROUND(B2,2); with those example values, the result is FALSE because both round to 1.23. - Using incompatible ranges: In SUMIF, the criteria range and sum range should align row by row. In COUNTIFS, each criteria range needs the same size and shape. Misaligned ranges can produce incorrect-looking totals or errors.
When a result is unexpected, check the operator first, then inspect the actual values in the cells. Look for extra spaces, text-formatted numbers, dates stored as text, blanks, and hidden decimal places. Formatting and displayed rounding can conceal differences that the formula still evaluates.
Frequently Asked Questions
What is the Excel symbol for greater than?
Use >. For example, =A2>B2 returns TRUE if A2 is larger than B2, and FALSE otherwise.
How do I write greater than or equal to in Excel?
Use the two-character operator >=. It includes values equal to the threshold as well as those above it.
How do I count cells less than a number?
Use COUNTIF with a less-than criterion, such as =COUNTIF(A2:A20,"<50") for values below 50. The criterion excludes cells equal to 50.
Can I use greater than with dates?
Yes. Excel compares valid date values chronologically. Check that both entries are real dates rather than text that only looks like a date.
Why does my greater-than formula return FALSE?
The first value may not actually be larger, the values may be equal, or a number or date may be stored as text. Also check for hidden decimal places and confirm whether your rule should include equality by using >=.
Related
- Excel Data Validation Icon: What It Looks Like and Does
- Data Validation Multiple Selection in Excel: What Works
- Data Validation Interview Questions and Strong Answers
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- SUMIF in Excel: Total a Column by One CriterionTo total values in an Excel column when another column meets one condition, use SUMIF. With categories in…
- How to Filter Duplicates in ExcelTo filter duplicate rows in Excel for Microsoft 365 on Windows, add a helper column with a formula…
- Excel SUMIFS With Multiple Criteria: A Practical GuideWith sales in D2:D7, regions in B2:B7, and products in C2:C7, use =SUMIFS(D2:D7,B2:B7,"East",C2:C7,"Tea") to add sales where the…
- Rank in Excel: Formula Examples, Ties, and Sort OrderTo rank values in Excel, use RANK.EQ: with scores in B2:B6, enter =RANK.EQ(B2,$B$2:$B$6,0) in C2 and fill down.…
- Excel Days Until Due: Formula, Date Math, and Alerts ExplainedTo calculate days until a due date in Excel, put the due date in A2 and enter =A2-TODAY()…
- Concat Excel Date Format: Keep Dates ReadableTo concatenate a date in Excel and keep it readable, convert the date to formatted text with TEXT…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.