Calculate Average If a Range Lies Between Two Values in Excel

In Excel, calculating the average of values that fall between two limits (like 50 and 100) isn’t as straightforward as it seems. While AVERAGEIF function supports one condition, it doesn’t directly support range-based filtering with two boundaries. That’s where AVERAGEIFS function becomes essential.

In this article, you’ll learn all the working ways to calculate average if between two values, including examples with numeric ranges, date ranges, and cell-based references. You’ll also learn how to avoid common errors and dynamically update ranges without editing formulas.

Key Takeaways

Steps to find average if between two values:

➤ Click on a blank cell like E2 to enter your formula.
➤ Type the following formula:
=AVERAGEIFS(C2:C11, C2:C11, “>=100”, C2:C11, “<=130”)
➤ Press Enter.

overview image

Download Practice Workbook
1

Average a Range Between Two Values in the Same Column

Let’s begin with a basic case where you want to average values that fall between two specific numbers within the same column. For example, if column C contains product sales data, you might want to calculate the average of sales values that fall between 100 and 130. Since both your filtering criteria and your average source are the same column, this setup is straightforward using the AVERAGEIFS function.

To follow along with the number-based methods in this article, we’ll use a simple dataset containing Age, Score, and Sales. The Age column will be used as a condition (criteria), while the Score and Sales columns will be used to calculate averages.

Average a Range Between Two Values in the Same Column

Steps:

➤ Click on a blank cell like E2 to enter your formula.
➤ Type the following formula:

=AVERAGEIFS(C2:C11, C2:C11, “>=100”, C2:C11, “<=130”)

➤ Press Enter.

Average a Range Between Two Values in the Same Column

This returns the average of all values in column C that are greater than or equal to 100 and less than or equal to 130.


2

Average a Range Between Two Values Across Two Columns

This method lets you use two separate ranges like an Age column for criteria and a Score column for averaging. It’s ideal when the condition is based on one field and the values to average are in another. In this case, we’ll calculate the average Score for people whose age is between 70 and 75.

Steps:

➤ In A2:A11, enter the ages.
➤ In B2:B11, enter the corresponding scores.
➤ In a blank cell like E2, use formula:

=AVERAGEIFS(B2:B11, A2:A11, “>=70”, A2:A11, “<=75”)

➤ Press Enter.

Average a Range Between Two Values Across Two Columns

This returns the average Score where Age is between 70 and 75.


3

Find Average Between Two Values Using Cell References

This method lets you make the formula dynamic by using cell inputs instead of hardcoding the number limits. It’s perfect for templates and dashboards where users can define their own range. Here, we’ll average values in column C based on the lower and upper limits entered in cells E5 and E7.

Steps:

➤ In E5, type the lower limit (e.g., 100).
➤ In E7, type the upper limit (e.g., 130).

Find Average Between Two Values Using Cell References

➤ In a blank cell like E2, use formula:

=AVERAGEIFS(C2:C11, C2:C11, “>=”&E5, C2:C11, “<=”&E7)

➤ Press Enter.

Find Average Between Two Values Using Cell References

You’ll get the average Sales value from column C where values fall between what’s entered in E5 and F7.


4

Calculate Average Between Two Date Values

This method helps you average values based on a date range, which is especially useful for monthly reports, sales trends, or time-based analysis. We’ll use a dataset where column A contains dates and column B holds sales values, and calculate the average Sales for dates between March 1 and April 30, 2025.

Calculate Average Between Two Date Values

Steps:

➤ In A2:A11, enter dates in 2025 (e.g., 3/28/2025, 4/01/2025, etc.).
➤ In B2:B11, enter the corresponding Sales values.
➤ In a blank cell like D2, enter this formula:

=AVERAGEIFS(B2:B11, A2:A11, “>=3/1/2025”, A2:A11, “<=4/30/2025”)

➤ Press Enter.

Calculate Average Between Two Date Values

➤ Alternatively, enter this formula to handle errors and blank cells neatly:

=IFERROR(AVERAGEIFS(B2:B11, A2:A11, “>=3/1/2025”, A2:A11, “<=4/30/2025”), 0)

Calculate Average Between Two Date Values

This returns the average sales value in column B where the date in column A falls between March 1 and April 30, 2025.


Frequently Asked Questions

What does AVERAGEIFS do in Excel?

AVERAGEIFS calculates the average of values in a range that meet multiple specified criteria. Unlike AVERAGEIF, it supports using more than one condition, including upper and lower limits, making it perfect for in-between calculations.

Can I use AVERAGEIF for two values?

No, the AVERAGEIF function only supports a single condition. If you want to calculate averages based on a range between two values or multiple conditions, you need to use AVERAGEIFS function, which allows multiple criteria.

Does AVERAGEIFS work with dates?

Yes, AVERAGEIFS function fully supports date criteria. You can use operators like >= and <= with date values to filter data and calculate averages for values that fall within a specific date range in your dataset.

What if my range returns no matches?

If your criteria find no matching values, AVERAGEIFS function returns a divide-by-zero error. To handle this neatly, wrap your formula with IFERROR function to display a zero, blank cell, or custom message instead of an error.

Can I make the limits flexible?

Absolutely. Instead of hardcoding values in your formula, reference cells for criteria (e.g., “>=”&E2) to make your average calculations dynamic. This flexibility is especially useful in dashboards or templates where input values change regularly.


Wrapping Up

In this tutorial, we learned how to use the AVERAGEIFS function to calculate the average if between two values in Excel. We also explored examples using numeric data, date ranges, and cell-based inputs. Each method allows flexible and accurate filtering using dual conditions. Feel free to download the practice file and share your feedback.

ExcelInsider Team
We will be happy to hear your thoughts

Leave a reply

Excel Insider
Logo