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

This is an overview.

Overview of How to Use Less Than Or Equal to Excel


The sample dataset contains information about two fruit stores.


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

Use Less Than or Equal to (<=) to compare string values:

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

Compare String Values with Less Than Or Equal to Operator in Excel

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.

Compare String Values with Less Than Or Equal to Operator in Excel

Read More: How to Use Greater Than or Equal to Operator in Excel Formula


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

Compare the prices of the same fruit in both stores:

Compare Numeric Values with Less Than Or Equal to Operator in Excel

  • 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.

Compare Numeric Values with Less Than Or Equal to Operator in Excel

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.

Read More: How to Perform Greater than and Less than in Excel


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

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

Compare Dates with Less Than Or Equal to Operator in Excel

  • 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.

Compare Dates with Less Than Or Equal to Operator in Excel

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 reference. To avoid this error, add the DATEVALUE function.

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

Compare Dates Using DATEVALUE with Less Than Or Equal to Operator in Excel

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")

Compare Dates Using DATEVALUE with Less Than Or Equal to Operator in Excel

“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

In the the dataset below, find who failed or passed based on numbers. Use the Less Than or Equal to (<=) operator with the IF function.

Using Less Than Or Equal to with IF Function

  • 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.

Using Less Than Or Equal to with IF Function

The value in D6 is greater than 59: Pass.

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

Using Less Than Or Equal to with IF Function

Read More: How to Apply ‘If Greater Than’ Condition In Excel


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

In the dataset below, use Less Than or Equal to (<=) as the criterion in the COUNTIF function to find who failed.

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

COUNTIF Function with Less Than Or Equal to Operator

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

To SUM particular values depending on criteria, use the Less Than or Equal to (<=) logical operator with the SUMIF function.

Using Less Than Or Equal to with SUMIF Function

  • 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.

Using Less Than Or Equal to with SUMIF Function


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:

Conditional Formatting Using Less Than Or Equal to Operation

 

  • 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.

Conditional Formatting Using Less Than Or Equal to Operation

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

  • In New Formatting Rule, click OK again.

Conditional Formatting Using Less Than Or Equal to Operation

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


Practice Section

Practice here.

Practice sheet to Practice the Less Than Or Equal to Operator


Download Practice Workbook


Further Readings


<< Go Back to Excel Operators | Excel Formulas | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Shamima Sultana
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

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo