To put "less than or equal to" in Excel, use the operator <=. This is created by typing the less-than sign (<) followed immediately by the equals sign (=) with no space between them. This operator tells Excel to check if one value is either smaller than or exactly equal to another value, returning a TRUE or FALSE result.
What You'll Need
- A computer with Microsoft Excel installed (any version) or a web browser using Excel for the Web.
- A dataset or specific cells containing the numbers you wish to compare.
Step-by-Step
Depending on your goal, you will use the <= symbol in different ways. Here are the three most common methods: using it in a basic formula, inside an IF statement, and for Conditional Formatting.
Method 1: Basic Logical Comparison
- Click on the cell where you want the result (TRUE or FALSE) to appear.
- Type the equals sign (=) to start the formula.
- Click the first cell you want to check (e.g., A2).
- Type the less than or equal to operator: <=.
- Click the second cell or type a specific number you are comparing against (e.g., B2 or 100).
- Press Enter. If A2 is 50 and B2 is 100, the cell will display TRUE.
Method 2: Using <= in an IF Statement
- Select the cell where you want a custom message to appear based on the comparison.
- Type
=IF(. - Enter your logical test using the operator (e.g.,
A2<=100). - Type a comma (
,), then put the value you want to see if the condition is met in quotation marks (e.g.,"Within Budget"). - Type another comma (
,), then put the value you want to see if the condition is not met in quotation marks (e.g.,"Over Budget"). - Close the parenthesis and press Enter. The full formula looks like:
=IF(A2<=100, "Within Budget", "Over Budget").
Method 3: Using <= for Conditional Formatting
- Highlight the range of cells you want to format.
- Go to the Home tab on the ribbon.
- Click Conditional Formatting > Highlight Cells Rules > Less Than....
- Note that the default menu says "Less Than." To include "Equal To," you must select More Rules... at the bottom of that specific menu.
- In the dialog box, change the dropdown from "cell value is less than" to less than or equal to.
- Enter the threshold value in the box to the right.
- Select your preferred formatting style (e.g., Light Red Fill with Dark Red Text) and click OK.
Common Mistakes
- Wrong Order: Typing
=<instead of=<=. If you omit the equals sign, Excel will only find values strictly smaller than your target, ignoring values that are exactly equal. - Incorrect Sequence: Typing
= =<. The equals sign must always come second in the operator. Typing= <is correct for the formula start, but= = <will result in a formula error. - Adding Spaces: Putting a space between the two symbols (e.g.,
< =). Excel will not recognize this as a single operator and will likely return a #NAME? or #VALUE! error. - Text vs. Numbers: Trying to use <= on cells that are formatted as "Text" even if they look like numbers. The operator only works on numerical data or dates.
Tips
- Use Cell References: Instead of typing a number like
<=100, type a cell reference like<=B1. This allows you to change the limit in cell B1 without having to rewrite all your formulas. - Dates are Numbers: Remember that Excel treats dates as serial numbers. You can use
<=to find dates that occur on or before a specific deadline. - Combining Conditions: Use the
ANDfunction if you need a value to be less than or equal to one number AND greater than or equal to another (e.g.,=AND(A2<=100, A2>=50)).
Troubleshooting
If your formula is not working as expected, try these steps in order:
- Check for Spaces: Ensure there is no space between the < and the =.
- Verify Data Types: Select your data and look at the "Number" format dropdown in the Home tab. If it says "Text," change it to "General" or "Number" and re-enter the data.
- Check the Formula Start: Ensure you started the cell with a single equals sign (=). If you see the literal text
=A2<=100in the cell instead of a result, the cell is likely formatted as Text. Change the format to General and press F2 then Enter to refresh the formula. - Check for Circular References: Ensure the cell containing the formula is not part of the range being tested (e.g., putting the formula in cell A2 to test the value of cell A2).
Frequently Asked Questions
Can I use a special symbol like ≤ instead of <= ?
No, Excel does not recognize the mathematical symbol ≤ as a functional operator in formulas. You must use <= for the calculation to work. If you want to display ≤ as a label for a reader, you can insert it via Insert > Symbol, but it will not perform a calculation.
What is the difference between < and <= ?
The < (less than) operator excludes the target number. For example, if the rule is <10, then 9.99 is TRUE but 10 is FALSE. The <= (less than or equal to) operator includes the target number; if the rule is <=10, then both 9.99 and 10 are TRUE.
How do I use "less than or equal to" in a SUMIF formula?
When using <= in a SUMIF or COUNTIF function, you must wrap the operator in double quotation marks. For example: =SUMIF(A1:A10, "<=100", B1:B10).
Does <= work with percentages?
Yes. Since percentages are decimals in Excel (e.g., 50% is 0.5), you can use <=50% or <=0.5 in your formulas.
Can I use this operator to compare two different columns?
Yes. You can compare cell A2 to B2 by typing =A2<=B2. When you drag this formula down a column, Excel will automatically compare A3 to B3, A4 to B4, and so on.