AVERAGE formula miscalculating time

Copper Contributor
Hello everyone! I'm struggling with average formula and times. Whenever I enter the formula to calculate average time it returns a completely different average than what the status bar shows when I just select the rage of cells that contain the times I want to average. Has anyone faced this issue before? Please, any help would be great, its for my job. Excel version is Excel for Microsoft 365 MSO (Version 2302 Build 16.0.16130.20848) 64-bit.
2 Replies

@Luiscenciado Please provide some examples.

@Luiscenciado 

It's common to encounter discrepancies between the average displayed in the status bar and the result obtained using the AVERAGE formula when calculating time in Excel. This happens because Excel stores time values as decimals representing the number of days since December 30, 1899.

Here's why you might see different results:

1. Formatting:

  • The status bar displays the sum of the selected times in hours:minutes:seconds format, while the AVERAGE formula calculates the average as a decimal representing the number of days.
  • To ensure consistency, format the cell containing the AVERAGE formula to display time using the desired format (e.g., hh:mm:ss).

2. Formula Interpretation:

  • The AVERAGE formula simply calculates the arithmetic mean of the selected cells, treating them as numerical values.
  • The status bar, however, considers the underlying time format and displays the sum in a user-friendly format.

Solutions:

1. Use the AVERAGEIFS function:

  • This function allows you to specify additional criteria for averaging based on specific conditions.
  • In your case, you can use the following formula:
Excel=AVERAGEIFS(range, range > 0)
  • This formula calculates the average only for cells containing positive time values (excluding zeros).

2. Convert time to decimal before averaging:

  • Divide each time value by 24 (number of hours in a day) before applying the AVERAGE formula.
  • After calculating the average, multiply the result by 24 to convert it back to hours.

3. Use a custom function (advanced users):

  • You can create a custom VBA function that specifically calculates the average of time values while considering their format.

Additional Tips:

  • Ensure all time values in the range are formatted consistently (e.g., hh:mm:ss).
  • Double-check the formula syntax and cell references for any errors.

By understanding the underlying reasons for the discrepancy and implementing these solutions, you can accurately calculate the average of time values in your Excel spreadsheet.