To test whether a number is greater than another value in Excel, use the greater-than operator >. For example, with numbers in A2 and B2, =A2>B2 returns TRUE if A2 is larger and FALSE otherwise; wrap the comparison in IF when you want a custom result instead.
The greater-than operator in Excel
The symbol > is a comparison operator. It compares the value on its left with the value on its right, and the result is a logical value: TRUE or FALSE. Excel does not need a special function just to check whether one number exceeds another.
With the value 125 in A2 and 100 in B2, the comparison returns TRUE because 125 is greater than 100. If A2 contains 100 instead, the result is FALSE: “greater than” does not include equality. This distinction matters when a threshold itself should count as a match.
With the values being compared in A2 and B2, enter this formula in C2 to test whether A2 is greater:
=A2>B2
Copy the formula down a column to compare each row. Excel adjusts relative references as it fills: in the next row, the formula compares A3 with B3. You can also compare a cell directly with a fixed number. With a score in B2, this formula checks whether it is above 70:
=B2>70
These formulas can be used in cells, in other formulas, and in tools such as conditional formatting. The comparison itself is the same in each case.
Show a message with IF
A bare comparison displays TRUE or FALSE. The IF function lets you show a word, label, number, or another calculation instead. Its structure is IF(logical_test, value_if_true, value_if_false): Excel checks the test, returns the second argument when it is true, and returns the third when it is false.
Suppose B2 contains a student’s score and 70 is the passing threshold. With the score in B2, this formula displays “Pass” only when the score is strictly greater than 70:
=IF(B2>70,"Pass","Not above 70")
A score of 71 produces Pass; scores of 70 or less produce Not above 70. If exactly 70 should also pass, use the greater-than-or-equal-to operator instead. With the score still in B2, the inclusive version is:
=IF(B2>=70,"Pass","Fail")
The distinction is useful for targets and rules: “more than 10” excludes 10, while “at least 10” includes it. Choose the operator that matches the wording of the real condition before building a larger formula around it.
Related comparison operators
Excel comparisons are not limited to >. The main operators are:
>means greater than.<means less than.>=means greater than or equal to.<=means less than or equal to.=means equal to.<>means not equal to.
The order of the symbols matters. For example, >= is a single comparison operator meaning “greater than or equal to”; it is not two separate tests. A common mistake is to use > when equality should count, which can leave boundary values out of a report.
For a range, combine two tests with AND. With a value in A2, this formula returns TRUE only if the value is at least 50 and no more than 100:
=AND(A2>=50,A2<=100)
Use AND when all conditions must be true. OR is appropriate when either condition can qualify, such as a score above 90 or a special exemption. These functions return TRUE or FALSE, so they can also serve as the logical test inside IF.
Compare a cell with a threshold in another cell
A threshold does not have to be typed into every formula. Keeping it in a worksheet cell makes a rule easier to update and audit. For example, put the target in D1 and a measured value in B2. With the target in D1 and the value in B2, this formula checks whether the value exceeds the target:
=B2>D1
If you copy this formula down, the reference to D1 will move to D2, D3, and so on unless you lock it. With the target in D1 and values in B2:B20, use an absolute reference to keep the target fixed as you fill down:
=B2>$D$1
The dollar signs lock both the column and row of D1. In Microsoft 365 for Windows, select the reference in the formula bar and press F4 to cycle through reference styles; on many Mac keyboards, use Command+T, though keyboard settings can affect function-key behavior. You can also type the dollar signs yourself. Absolute references are especially helpful when comparing a list of sales, scores, or inventory levels with one shared target.
Count or total values above a threshold
If the goal is to summarize many values, COUNTIF can count cells that meet a greater-than condition. With scores in B2:B10, this formula counts scores above 100:
=COUNTIF(B2:B10,">100")
For example, if the range contains 80, 101, 120, 100, and 105, among other values, the formula counts only entries greater than 100; 100 itself is excluded. COUNTIF takes a range and a criterion. When a criterion uses an operator and a number typed directly, the operator and number go together inside quotation marks.
You can also use a threshold stored in a cell. With values in B2:B10 and the comparison threshold in D1, this version joins the greater-than sign to the cell reference:
=COUNTIF(B2:B10,">"&D1)
To add the matching values rather than count them, use SUMIF. With amounts in B2:B10 and a threshold in D1, this formula totals values above the threshold:
=SUMIF(B2:B10,">"&D1)
In this one-range form, SUMIF uses the same range both to test the condition and to sum qualifying values. If the criteria range and sum range are different, provide the sum range as the third argument. Check that both ranges cover corresponding rows so that the condition is applied to the intended records.
Highlight numbers that exceed a target
Conditional formatting can visually flag values without adding a helper column. Select the cells to format, then in Excel for Microsoft 365 on Windows choose Home > Conditional Formatting > Highlight Cells Rules > Greater Than. Enter the threshold, select a format, and confirm. The rule highlights cells whose values are greater than the chosen number; values equal to the threshold are not highlighted.
For a target stored in a cell, or for more flexible rules, choose Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format. If the selected range begins at B2 and the target is in D1, enter this formula in the rule:
=B2>$D$1
Set the formatting and apply the rule. The first reference should correspond to the top-left cell of the selected range; Excel adjusts the relative row for the other cells. On Mac, Conditional Formatting is also available on the Home tab, though dialog layouts can differ slightly. Excel for the web supports conditional formatting, but some advanced rule editing options may differ from the desktop app.
Common problems and how to fix them
- The formula says FALSE unexpectedly. Check whether the values are actually numbers. A number stored as text may not behave as expected in calculations or comparisons. Use Excel’s error indicators or inspect the cell format and imported data; changing the display format alone does not always convert text into a number.
- The boundary value is missing. If the rule should include equality, change
>to>=. A strict greater-than test deliberately excludes an equal value. - The formula changes when copied. Relative references adjust when filled. Lock a fixed threshold with dollar signs, as in
$D$1, while leaving the value being checked relative if each row should use its own value. - A COUNTIF criterion is not recognized. Put a typed comparison criterion such as greater than 100 in quotation marks as one text criterion. To compare against a cell, join the operator to the reference with
&. - Dates appear to compare strangely. Excel stores real dates as serial numbers, so two genuine date values can be compared with
>. Confirm that both entries are recognized as dates, rather than one being text that merely looks like a date. - Blank cells affect the result. A blank reference can be treated like zero in some numeric comparisons. If blanks should never qualify, test for a nonblank cell as well. With a value in B2, use:
=AND(B2<>"",B2>100)
This returns TRUE only when B2 is not empty and is above 100. If your workbook uses a different regional setting, Excel may expect semicolons instead of commas between function arguments. That setting affects argument separators, not the meaning of the greater-than operator.
Choose the right approach
Use a direct comparison when you need a TRUE/FALSE answer or want to build a larger logical test. Use IF when the worksheet should display a useful label or different result. Choose COUNTIF to count qualifying entries, SUMIF to add them, and conditional formatting when the main need is visual emphasis. These approaches can work together: a helper formula can identify exceptions, while a summary formula counts them.
Before copying a rule across a workbook, decide whether the threshold is fixed or changes by row, and whether equality should count. Those two choices determine the operator and reference style. For a simple one-off check, =A2>B2 is usually enough; for a reusable report, put the threshold in a clearly labeled cell and refer to it.
Frequently Asked Questions
What is the Excel formula for greater than?
Use the > operator between two values, such as =A1>B1. It returns TRUE when A1 is larger and FALSE otherwise.
How do I write greater than or equal to in Excel?
Use >=. For example, =A1>=10 is TRUE when A1 is 10 or greater, including exactly 10.
How do I show “Yes” if a number is greater than a limit?
Use IF with a comparison as its first argument. For example, with the tested value in A2 and a limit of 50, =IF(A2>50,"Yes","No") shows Yes only above 50.
How can I count numbers greater than a value in a cell?
Use COUNTIF and join the operator to the threshold reference. With values in A2:A20 and the threshold in D1, use =COUNTIF(A2:A20,">"&D1).
Does greater than include the same number?
No. > excludes equality. Use >= when the matching number should also qualify.
Related
- How to Share an Excel Workbook in Windows 11 Safely
- How to Share Excel in Google Drive: A Clear Guide
- How to Share Excel in Microsoft 365
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel VLOOKUP With Multiple Criteria: Examples and TipsYes—VLOOKUP can look up a row using multiple criteria if you combine those criteria into one lookup key.…
- Excel SEQUENCE Function Examples for Dates and NumbersExcel’s SEQUENCE function creates a spill range of consecutive numbers, dates, or other values from one formula. For…
- Lock a Named Range in an Excel Formula?Usually, you do not need to add dollar signs to lock a named range in an Excel formula:…
- Divide a Cell by a Number in Excel: Formula GuideTo divide a cell by a number in Excel, enter a formula such as =A2/5 in an empty…
- IFERROR Formula in Excel: Syntax, Examples, and FixesIn Excel, use IFERROR to return a chosen result when a formula produces an error: it has the…
- COUNTIF in Excel: Count Cells That Contain NumbersYes—COUNTIF can count cells that meet a numeric condition, and it can find text containing a particular digit.…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.