# How to Use Less Than Or Equal to Operator in Excel – 8 Examples

This is an overview.

The sample dataset contains information about two fruit stores.

### Example 1 – Compare String Values with Less Than Or Equal to Operator

• Select J6.
• Enter the following formula.
`=B6<=F6`

Less Than or Equal to (<=) compares the string value of B6 and F6. If the string value of  B6 is less than or equal to F6, it will return TRUE. Otherwise, FALSE.

• Press ENTER.

This is the output.

The string value of B6 cell is equal to F6: TRUE.

• Drag down the Fill Handle to see the result in the rest of the cells.

### Example 2 – Compare Numeric Values with the Less Than Or Equal to Operator

Compare the prices of the same fruit in both stores:

• Select H6.
• Enter the following formula.
`=C6<=F6`

Less than or equal to (<=) compares the numeric value in C6 and F6. If the numeric value in C6 cell is less than or equal to F6 , it will return TRUE.  Otherwise, FALSE.

• Press ENTER.

This is the output.

The numeric value in C6 is greater than F6: FALSE.

• Drag down the Fill Handle to see the result in the rest of the cells.

### Example 3 – Compare Dates using the Less Than Or Equal to Operator in Excel

An extra column was added to the dataset: Order Date.

• Select J6.
• Enter the following formula.
`=D6<=H6`

Less Than or Equal to (<=) compares the date value in D6 and H6. If the date value in D6 is less than or equal to H6, it will return TRUE. Otherwise, FALSE.

• Press ENTER.

This is the output.

The date value in D6 greater than H6: FALSE.

• Drag down the Fill Handle to see the result in the rest of the cells.

Read More: ‘Not Equal to’ Operator in Excel

### Example 4 – Compare Dates Using the DATEVALUE Function with the Less Than Or Equal to Operator

The Less Than or Equal to (<=) logical operator will show an error if you compare dates without using cell references.

• Select J6.
• Enter the following formula.
`=D6<=1/30/2022`

Less Than or Equal to (<=) compares the date value in D6 with the date 1/30/2022. If the date value in D6 is less than or equal to the date 1/30/2022, it will return TRUE. Otherwise FALSE.

• Press ENTER.

This is the output.

The date value in D6 cell is less than 1/30/2022 date: TRUE, but FALSE is displayed.

Use the DATEVALUE function with the Less Than or Equal to (<=) logical operator:

• Select J6.
• Enter the following formula.
`=D6 <= DATEVALUE("1/30/2022")`

“1/30/2022” is used as date_text. The DATEVALUE function converts this date into a number: 44591.

Less Than or Equal to (<=) compares the date value in D6 with the result of the DATEVALUE function. If the date value in D6 cell is less than or equal to the number, it will return TRUE. Otherwise, FALSE.

• Press ENTER.

This is the output.

You need to enter each date as date_text in the DATEVALUE formula.

### Example 5 – Using Less Than Or Equal to with the IF Function in Excel

Find who failed or passed based on numbers.

• Select E4.
• Enter the following formula.
`=IF(D4<=59, "Fail","Pass")`

D4<=59 is the logical_test: “Fail” as value_if_true and “Pass” as value_if_false.

In the logical_test, Less Than or Equal to (<=) was used to find the numbers less than or equal to 59. If the condition is met, it will return Fail. Otherwise, Pass.

• Press ENTER.

This is the output.

The value in D6 is greater than 59: Pass.

• Drag down the Fill Handle to see the result in the rest of the cells.

### Example 6 – Use the COUNTIF Function with the Less Than Or Equal to Operator

To find who failed.

• Select H4.
• Enter the following formula.
`=COUNTIF(D4:D11, "<=59")`

D4:D11 is the range and “<=59” the criteria.

The COUNTIF function searches values Less Than or Equal to 59.

• Press ENTER.

This is the output.

### Example 7 – Using Less Than Or Equal to with the SUMIF Function in Excel

• Select G4.
• Enter the following formula.
`=SUMIF(D4:D12, "<=6000",D4:D12)`

D4:D12 is the range used in the the condition and  “<=6000” is the criteria. D4:D12 is the sum_range.

The SUMIF Function looks for values Less Than or Equal to 6000 sums values, in which criteria are fulfilled.

• Press ENTER.

This is the output.

### Example 8 – Using Conditional Formatting with the Less Than Or Equal to Operators

The dataset below contains students’ marks. To highlight values Less Than or Equal to 59:

• Selected D4:D11.
• Go to the Home tab >> Conditional Formatting >> select New Rule

• In Select a Rule Type, choose Use a formula to determine which cells to format.
• In Edit the Rule Description, enter the following formula.
`=D4 <= 59`
• Click Format to set the Fill color.

• Select a fill color. Here, Red.
• Click OK.

• In New Formatting Rule, click OK again.

Cells in which the condition is met are Highlighted in Red.

## Practice Section

Practice here.

<< Go Back to Excel Operators

Get FREE Advanced Excel Exercises with Solutions!
Shamima Sultana

Shamima Sultana, BSc, Computer Science and Engineering, East West University, Bangladesh, has been working with the ExcelDemy project for 2 years. She has written over 75+ articles and reviewed 1000+ articles for ExcelDemy. She has also led several teams with Excel VBA and Content Development works. Currently, she is working as the Project Manager and oversees the day-to-day work, leads the services team, allocates resources to the right area, etc. Her work and learning interests vary from Microsoft... Read Full Bio

We will be happy to hear your thoughts

Advanced Excel Exercises with Solutions PDF