# Excel IF Statement Between Two Numbers (4 Ideal Examples)

Get FREE Advanced Excel Exercises with Solutions!

In this article, we will show 4 ideal examples of how to use if statement between two numbers in Excel. To check if a number is within 2 boundary ranges, we can use the IF and AND functions. You can easily do this task in Excel. So, without any delay, letâ€™s start the discussion.

## 4 Ideal Examples of IF Statement Between Two Numbers in Excel

To demonstrate the methods, we will use the following dataset. The dataset contains information on the employees of a company. Here, there is information about Employeeâ€™s Name, Age and Joining Dates. Now, we will show 4 ideal examples of Excel IF statement between two numbers.

### 1. Use IF Statement Between Two Numbers in Excel

In this example, with the AND Function, we can find out if the age of the employees is inside 2 boundary numbers. And with the IF Function, we can add writing to the conditions. Letâ€™s follow the steps below to learn the method.

#### 1.1. Use IF Statement Between Two Numbers Exclusively

• Firstly, declare the boundary numbers.
• Here, we have taken 32 and 26 as Upper Limit and Lower LimitÂ respectively.
• So, we will find out if the age is between this boundary condition.

• To do so, write the following formula in the formula bar of the D5 cell:
`=IF(AND(C5>\$C\$16,C5<\$C\$15),"Yes","No")`
• Then, press Enter to see the result.
• Here, this No result indicates that the value is not between the limits.

Here, if the value of the C5 cell( Age of the employee) is greater than the C16 cell (Lower Limit) and less than the C15 cell (Upper Limit), then it will show Yes. Else, it will show No.
• After that, drag down the formula in the D6:D13 range with the Fill HandleÂ option.

• As a result, you can observe the result in the DÂ column.
• Here, if the age is between 26 and 32 exclusively, then it is showing Yes.
• Else, the result is showing No.

#### 1.2. Use IF Statement Between Two Numbers Inclusively

• In the following step, we will find out if the age is between this boundary condition with the Inclusive condition.
• Now, write down the following formula in the formula bar of the E5 cell:
`=IF(AND(C5>=\$C\$16,C5<=\$C\$15),"Yes","No")`
• Then, press Enter to see the result.
• Here, this Yes indicates that the value is between the limits.

Here, if the value of the C5 cell( Age of the employee) is greater or equal to the C16 cell (Lower Limit) and less or equal to the C15 cell (Upper Limit), then it will show Yes. Else, it will show No.
• After that, drag down the formula in the E6:E13 range with the Fill HandleÂ option.

• As a result, you can observe the result in the EÂ column.
• Here, if the age is between 26 and 32 inclusively, then it is showing Yes.
• Else, the result is showing No.

Here, the numbers between 26 and 32 is showing Yes. For the Inclusive option, 26 and 32 are also showing Yes and for the Exclusive option, 26 and 32 are showing No.

### 2. Check If Value Is Between Maximum and Minimum Numbers

In this example, we will find out if the age of the employees is inside 2 boundary numbers. Letâ€™s follow the steps below to learn the method.

#### 2.1. Consider Exclusive Result

• Firstly, declare the boundary numbers.
• Here, we have taken 35,38, and 34 as Upper Limits.
• And, we have taken 28,27, and 26 as Lower Limits.
• From these limits, we have to calculate the Upper Limit and Lower LimitÂ respectively.
• After that, we will find out if the age is between the calculated boundary condition.

• To do so, write the following formula in the formula bar of the D5 cell:
`=IF(AND(C5>MIN(\$C\$16:\$E\$16),C5<MAX(\$C\$15:\$E\$15)),"Yes","No")`
• Then, press Enter to see the result.
• Here, this No result indicates that the value is not between the limits.

Here, using the MIN function we will get the Lower Limit of the C16:E16 range and by the MAX function, we will get the Upper Limit of the C15:E15 range. After that, if the value of the C5 cell( Age of the employee) is greater than the calculated Lower Limit and less than the calculated Upper Limit, then it will show Yes. Else, it will show No.
• After that, drag down the formula in the D6:D13 range with the Fill HandleÂ option.

• As a result, you can observe the result in the DÂ column.
• Here, if the age is between the calculated upper and lower range exclusively, then it is showing Yes.
• Else, the result is showing No.

#### 2.2. Find Inclusive Result

• In the following step, we will find out if the age is between this boundary condition with the Inclusive condition.
• Now, write down the following formula in the E5 cell:
`=IF(AND(C5>=MIN(\$C\$16:\$E\$16),C5<=MAX(\$C\$15:\$E\$15)),"Yes","No")`
• Then, press Enter to see the result.
• Here, this Yes result indicates that the value is between the limits.

Here, using the MIN function we will get the Lower Limit of the C16:E16 range and by the MAX function, we will get the Upper Limit of the C15:E15 range. After that, if the value of the C5 cell( Age of the employee) is equal or greater than the calculated Lower Limit and equal or less than the calculated Upper Limit, then it will show Yes. Else, it will show No.
• After that, drag down the formula in the E6:E13 range with the Fill HandleÂ option.

• As a result, you can observe the result in the EÂ column.
• Here, if the age is between the calculated upper and lower range inclusively, then it is showing Yes.
• Else, the result is showing No.

### 3. Insert IF Statement Between Two Dates in Excel

In this example, we will find out if the joining date of the employees is inside 2 boundary dates. Letâ€™s follow the steps below to learn the method.

STEPS:

• Firstly, declare the boundary numbers.
• Here, we have taken the 1st of January, 2022 and 31st of December, 2022 as Lower Limit and Upper LimitÂ respectively.
• So, we will find out if the joining date is between this boundary condition.
• To do so, write the following formula in the formula bar of the D5 cell:
`=IF(AND(C5>=\$C\$16,C5<=\$C\$15),"Yes","No")`
• Then, press Enter to see the result.

Here, if the value of the C5 cell( Joining Date of the employee) is greater or equal to the C16 cell (Lower Limit) and less or equal to the C15 cell (Upper Limit), then it will show Yes. Else, it will show No.
• After that, drag down the formula in the D6:D13 range with the Fill HandleÂ option.

• As a result, you can observe the result in the DÂ column.
• Here, if the joining date is between 1st January and 31 December 2022 then it is showing Yes.
• Else, the result is showing No.

### 4. Apply IF Statement to Check If Dates Are Within Some Specific Days

In this example, we will find out if the joining date of the employees is within some specific days.

#### 4.1. Within Next N Days

Suppose, we want to find out if there is any possibility of a new joining within a few days. Therefore, in the following step, we will find out if the joining date of the employees is within the next some days.

• Now, write down the following formula in the formula bar of the D5 cell:
`=IF(AND(C5>TODAY(),C5<=TODAY()+7),"Upcoming Joining","Already Joined")`
• Then, press Enter to see the result.
• Today is 11th January 2023.
• And, as the date is not between 11 to 18th January 2023, it is showing Already Joined.

• After that, drag down the formula in the D6:D13 range with the Fill HandleÂ option.

• As a result, you can observe the result in the DÂ column.
• Here, if the joining date is between today and (today+7) days, then it is showing Upcoming Joining.
• Else, the result is showing Already Joined.

#### 4.2. Within Last N Days

Suppose, we want to find out if there is any possibility of new joining within a few days. Therefore, in the following step, we will find out if the joining date of the employees is within the next some days.

• Now, write down the following formula in the formula bar of the D5 cell:
`=IF(AND(C5>TODAY(),C5<=TODAY()+7),"Upcoming Joining","Already Joined")`
• Then, press Enter to see the result.
• Today is 11th January 2023.
• And, as the date is not between 11 to 4th January 2023, it is showing No.

• After that, drag down the formula in the D6:D13 range with the Fill HandleÂ option.

• As a result, you can observe the result in the DÂ column.
• Here, if the joining date is between today and (todayâ€“7) days, then it is showing Recently Joined.
• Else, the result is showing No.

## Conclusion

In this article, we have demonstrated 4 examples of Excel IF statement between two numbers. There is a practice workbook at the beginning of the article. Go ahead and give it a try. Last but not least, please use the comment section below to post any questions or make any suggestions you might have.

## What is ExcelDemy?

ExcelDemy Learn Excel & Excel Solutions Center provides free Excel tutorials, free support , online Excel training and Excel consultancy services for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Sudipta Chandra Sarker

Hello! Welcome to my Profile. Currently, I am working and doing research on Microsoft Excel. Here I will be posting articles related to this. My educational degree is BSc in Electrical and Electronic Engineering from Bangladesh University of Engineering and Technology, Bangladesh. I have a great interest in research and development. I always try to gather knowledge from various sources and try to make innovative solutions.

We will be happy to hear your thoughts

Advanced Excel Exercises with Solutions PDF