How can I calculate the average of data if it falls between two specific dates using Excel? 2

How can I calculate the average of data if it falls between two specific dates using Excel?

To calculate the average of data that falls between two specific dates using Excel, follow these steps:

1. Begin by opening a new Excel spreadsheet and entering the data that you want to calculate the average for.

2. Next, create a column next to your data and enter the corresponding dates for each data point.

3. Select the entire data set, including the date column, by clicking and dragging your mouse over the cells.

4. In the menu bar, click on the “Data” tab and then select “Sort” from the options.

5. In the pop-up window, choose to sort by the date column in ascending order.

6. Once the data is sorted, find the first date that falls within the range you want to calculate the average for and note its row number.

7. Find the last date that falls within the range and note its row number as well.

8. In a blank cell, enter the formula “=AVERAGE” and then select the cells that contain the data you want to average, using the row numbers from steps 6 and 7.

9. Press enter and the average for the data within the specific date range will be calculated.

10. You can format the cell to display the average as a specific number of decimal places or a percentage, if desired.

In summary, by sorting your data and using the AVERAGE formula in Excel, you can easily calculate the average of data that falls between two specific dates.

Excel: Calculate Average If Between Two Dates


You can use the following formula to calculate the average in Excel only for cells that fall between two specific dates:

=AVERAGEIFS(B2:B11, A2:A11, "<=1/15/2022", A2:A11, ">=1/5/2022")

This particular formula calculates the average value of cells in range B2:B11 where the date in the range A2:A11 is between 1/5/2022 and 1/15/2022.

The following example show  how to use this formula in practice.

Example: Calculate Average If Between Two Dates

Suppose we have the following dataset that shows the total sales made by some company on various dates:

We can use the following formula to calculate the average daily sales between 1/5/2022 and 1/15/2022:

=AVERAGEIFS(B2:B11, A2:A11, "<=1/15/2022", A2:A11, ">=1/5/2022")

The following screenshot shows how to use this formula in practice:

The average daily sales between 1/5/2022 and 1/15/2022 is 7.2.

We can manually verify that this is correct:

Average Daily Sales = (7 + 7 + 8 + 6 + 8) / 5 = 7.2.

Note: You can find the complete documentation for the AVERAGEIFS function .

Additional Resources

The following tutorials explain how to perform other common tasks in Excel:

Cite this article

stats writer (2024). How can I calculate the average of data if it falls between two specific dates using Excel?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-calculate-the-average-of-data-if-it-falls-between-two-specific-dates-using-excel/

stats writer. "How can I calculate the average of data if it falls between two specific dates using Excel?." PSYCHOLOGICAL SCALES, 1 Jul. 2024, https://scales.arabpsychology.com/stats/how-can-i-calculate-the-average-of-data-if-it-falls-between-two-specific-dates-using-excel/.

stats writer. "How can I calculate the average of data if it falls between two specific dates using Excel?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-calculate-the-average-of-data-if-it-falls-between-two-specific-dates-using-excel/.

stats writer (2024) 'How can I calculate the average of data if it falls between two specific dates using Excel?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-calculate-the-average-of-data-if-it-falls-between-two-specific-dates-using-excel/.

[1] stats writer, "How can I calculate the average of data if it falls between two specific dates using Excel?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, July, 2024.

stats writer. How can I calculate the average of data if it falls between two specific dates using Excel?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top