Calculation Issues

Convert Excel Time Text to Real Time Values for Averaging

Algirdas JasaitisAlgirdas Jasaitis Nov 18, 2026 871 views

Question details

Convert times stored as text into numeric time values so they can be averaged.

Convert Excel Time Text to Real Time Values for Averaging
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains time entries that need to be included in an AVERAGE calculation.
Observed behavior
The entries remain text until they are edited, so AVERAGE does not calculate them as time values.
Before you start

Check that the entries use a time format Excel recognizes, such as 9:30 AM or 14:30. Identify an empty column for converted values if you plan to use a formula.

Solution 1Recommended

Convert text times with a formula and calculate the average

Use a formula when you want to convert the entries in a separate column before averaging them.

1
Enter a conversion formula

If the first text time is in A2, enter =TIMEVALUE(A2) in an empty cell such as B2. Alternatively, enter =--A2 to convert a recognized numeric time string.

2
Fill the formula down

Select B2 and drag its fill handle down alongside the remaining time entries.

3
Format the converted values

Select the results, open Format Cells, and choose Time. For elapsed times that can exceed 24 hours, choose Custom and enter [h]:mm.

4
Calculate the average

In an empty cell, enter =AVERAGE(B2:B10), adjusting the range to match the converted values. Format the result as Time or as [h]:mm for a duration.

5
Replace formulas if needed

To keep fixed values, copy the converted cells and use Paste Special > Values in the destination range.

Convert text times with a formula and calculate the average
Check the input format: If conversion returns an error, check for unrecognized time formats or extra characters. TIMEVALUE extracts the time portion; the double-unary method can also retain a date if the text contains one.
WPS Spreadsheets

Convert and Average Text Times in WPS Spreadsheets

Open your workbook in WPS Spreadsheets, convert recognized text times with a formula, and average the resulting numeric values.

  1. 1. Open the workbook: Open WPS Spreadsheets and select Open to load your Excel workbook.
  2. 2. Convert the first entry: If a text time is in A2, enter =TIMEVALUE(A2) in an empty cell such as B2.
  3. 3. Fill down and average: Drag the fill handle down the column, then enter =AVERAGE(B2:B10) in an empty cell, adjusting the range as needed.
  4. 4. Format the results: Select the converted values and average, open Format Cells, and choose Time. For elapsed durations over 24 hours, use the custom format [h]:mm.
Convert text times with TIMEVALUE before averagingOpen and save Microsoft Excel XLSX filesFormat results as times or elapsed durationsUse familiar spreadsheet formulas and controls
microsoft office alternative - wps office

Frequently Asked Questions

Why does AVERAGE return #DIV/0! for my time entries?

AVERAGE ignores text. If the selected range contains no numeric values, it returns #DIV/0!. Convert recognized time text with =TIMEVALUE(A2) or =--A2, then average the converted cells.

Will changing the cell format to Time convert text into a time value?

No. Formatting changes how numeric values are displayed; it does not reliably convert text. Use a conversion formula or Data > Text to Columns first.

How do I display an average duration longer than 24 hours?

Select the average cell, open Format Cells > Custom, and enter [h]:mm. The brackets prevent the displayed hours from wrapping at 24.

Can I replace the original text times with the converted values?

Yes. Copy the formula results, select the destination cells, and choose Paste Special > Values. Check the results before removing the original entries.