Formula Generator | Excel

Calculating Averages in Excel Excluding Weekends and Holidays

Learn how to calculate the average of data in Excel using the AVERAGEIFS function while excluding weekends and holidays, ensuring only valid working days are considered in your analysis.


Empty image or helper icon

Prompt

averages set of data in a date range that excludes weekends and holidays

Answer

Averaging Data Excluding Weekends and Holidays in Excel

To calculate the average of a set of data within a specified date range while excluding weekends and holidays, you can utilize the AVERAGEIFS function combined with the NETWORKDAYS function for effective date handling.

Formula

The general formula to achieve this is as follows:

=AVERAGEIFS(DataRange, DateRange, ">="&StartDate, DateRange, "<="&EndDate, DateRange, "<>"&HolidaysList)

Explanation of Components

  1. DataRange: This is the range of cells containing the data to be averaged.

  2. DateRange: This is the range of cells containing the corresponding dates for the data.

  3. StartDate: The starting date of the range for which you want to calculate the average.

  4. EndDate: The ending date of the range for which you want to calculate the average.

  5. HolidaysList: This is a reference to a list of holiday dates that you wish to exclude. It can be a range of cells containing holiday values.

  6. Criteria: The average will only consider dates in the specified range that are not weekends or listed holidays, ensuring only valid working days are included in the calculation.

Practical Example

Sample Data Setup

Assume we have the following data:

  • Data is in the range B2:B10 (sales amounts)
  • Corresponding Dates are in range A2:A10
  • Holidays are listed in the range D2:D5
  • You want to average the data between 01/01/2023 and 01/15/2023

Sample Data

A (Date) B (Sales)
01/01/2023 200
01/02/2023 250
01/03/2023 300
01/07/2023 150
01/08/2023 200
01/09/2023 270
01/10/2023 320
01/14/2023 400
01/15/2023 450

Holidays in D2:D5:

D (Holidays)
01/01/2023
01/10/2023

Implementation

You would implement the formula as follows:

=AVERAGEIFS(B2:B10, A2:A10, ">=" & DATE(2023, 1, 1), A2:A10, "<=" & DATE(2023, 1, 15), A2:A10, "<>" & D2:D5)

Breakdown of the Formula

  1. B2:B10: The range of sales data to average.
  2. A2:A10: The dates associated with the sales data.
  3. ">=" & DATE(2023, 1, 1): This criterion includes dates starting from January 1st, 2023.
  4. "<=(" & DATE(2023, 1, 15): This criterion limits dates to January 15th, 2023.
  5. "<>" & D2:D5: This exclusion ensures that the average calculation disregards any dates in the holidays list.

Result Interpretation

The formula will average the sales between the specified dates, excluding weekends (01/07 and 01/14), and the recognized holidays (01/01 and 01/10). Thus, the effective days for averaging will include 01/02, 01/03, 01/08, 01/09, and 01/15.

Conclusion

Utilizing the AVERAGEIFS function along with proper date filtering enables precise calculations in scenarios where only working days should contribute to an average. This approach efficiently excludes undesirable dates, such as weekends and holidays, ensuring accurate and relevant data analysis.

For further learning on advanced Excel techniques and best practices, you may consider exploring the courses offered on the Enterprise DNA Platform.

Create your Thread using our flexible tools, share it with friends and colleagues.

Your current query will become the main foundation for the thread, which you can expand with other tools presented on our platform. We will help you choose tools so that your thread is structured and logically built.

Description

Learn how to calculate the average of data in Excel using the AVERAGEIFS function while excluding weekends and holidays, ensuring only valid working days are considered in your analysis.