Formula Errors

How to Fix Excel AVERAGE Returning #DIV/0! for Time Values

Elise WilliamsElise Williams Nov 4, 2026 869 views

Question details

The user needs to resolve a #DIV/0! error that occurs when attempting to calculate the average of a range of time values.

How to Fix Excel AVERAGE Returning #DIV/0! for Time Values
Product
Excel
Device & OS
not provided
Scenario
Calculating the average of time data imported from another system, where the data appears as standard times but is internally stored as text.
Observed behavior
The AVERAGE function returns a #DIV/0! error because it ignores the text values, finds no numeric data in the range, and consequently attempts to divide by zero.
Before you start

Ensure your time values do not contain invisible leading or trailing spaces, which can prevent spreadsheet software from recognizing them as numbers even after conversion attempts.

Solution 1Recommended

Convert Text to Numbers Using Paste Special

Force Excel to coerce text-formatted time values into real numeric data by adding zero to the range using the Paste Special feature.

When data is imported from external software, times and dates are frequently stored as text. Because the AVERAGE function completely ignores text strings, it calculates zero values to divide by, resulting in the #DIV/0! error. Using the Paste Special trick forces Excel to evaluate the text as a mathematical expression, converting it into a time serial number.

1
Select an Empty Cell

Find a completely blank cell anywhere in your worksheet, click on it, and press Ctrl+C (or right-click and select Copy). This cell holds a value of zero.

2
Highlight the Time Values

Select the entire range of time values (e.g., B2:B46) that are causing the #DIV/0! error in your AVERAGE formula.

3
Apply Paste Special

Right-click anywhere within the highlighted time range and select 'Paste Special' from the context menu.

4
Choose the Add Operation

In the Paste Special dialog box, locate the 'Operation' section, select the 'Add' radio button, and click OK.

5
Reformat and Recalculate

If the numbers turn into decimals, right-click the range, select 'Format Cells', and apply your desired Time format. Your =AVERAGE(B2:B46) formula will now calculate correctly.

Convert Text to Numbers Using Paste Special
Format Restored: Your text strings are now successfully converted into Excel's native time values, allowing all mathematical functions to work normally.
Resolve Formula Errors Easily

Fix Formula Errors Quickly in WPS Spreadsheet

WPS Spreadsheet provides excellent compatibility with Excel formulas and offers an intuitive one-click data conversion tool to easily fix issues like text-stored times without needing complex workarounds.

  1. 1. Open your Document in WPS: Launch WPS Spreadsheet and open the file containing your time data.
  2. 2. Highlight the Problematic Cells: Select the range of time values that are currently formatted as text.
  3. 3. Use Smart Error Checking: Click the small exclamation mark warning icon that appears next to your selection.
  4. 4. Convert to Number: Select 'Convert to Number' from the dropdown menu to instantly fix the data format.
  5. 5. Calculate the Average: Your existing AVERAGE formula will instantly update and display the correct result instead of a #DIV/0! error.
100% compatible with Microsoft Excel formulas including AVERAGE and VALUEOne-click 'Convert to Number' smart error checking toolFamiliar user interface requiring zero learning curveFree and lightweight alternative to Microsoft Office
QA img-9

Frequently Asked Questions

Why does the AVERAGE function ignore my time values?

The AVERAGE function is designed to only process numeric values. If it encounters text strings, blank cells, or logical values, it skips them. When times are imported from external systems, they often come in as text, leading the function to find zero numeric values to average.

How can I easily tell if my time values are stored as text?

By default, spreadsheet applications align text to the left side of a cell and numbers (including dates and times) to the right. If your time values align to the left without you manually changing the alignment, they are likely stored as text. You can also test a cell by typing =ISNUMBER(A1); if it returns FALSE, it is text.

Can I use the AVERAGEA function to prevent the #DIV/0! error?

While AVERAGEA will not return a #DIV/0! error (because it counts text cells as zero), it will give you an incorrect mathematical result. It will average the text cells as '0' instead of calculating the actual time value, resulting in a significantly skewed final average.

What if Paste Special doesn't fix the time conversion?

If the Paste Special method doesn't work, your data likely contains hidden non-breaking spaces or web characters. You will need to use the Find and Replace tool (Ctrl+H) to replace spaces with nothing, or use the TRIM and CLEAN functions in a helper column to strip out hidden formatting before converting.