Calculation Issues

Fix Excel TIMEVALUE Comparisons That Return False

Bushra ParveenBushra Parveen Dec 2, 2026 868 views

Question details

Compare a TIMEVALUE result with a manually entered time when both appear identical but the comparison returns FALSE.

Fix Excel TIMEVALUE Comparisons That Return False
Product
Microsoft Excel
Device & OS
not provided
Scenario
A formula compares a time extracted from text with a time entered in another cell.
Observed behavior
The cells display the same time, but an equality or IF comparison returns FALSE.
Before you start

Check that A1 contains text recognized by TIMEVALUE and B1 contains a numeric time without a date. Decide whether comparing to the nearest second is precise enough for your data.

Solution 1Recommended

Round Both Excel Times to the Nearest Second

Use this method when tiny floating-point differences cause two times to compare as unequal.

Excel stores times as fractions of a day using binary floating-point numbers. Values that display identically can differ slightly underneath; changing the cell format does not remove that difference.

1
Check the source cells

Enter or locate the time text in A1 and the numeric time to compare in B1. If the text includes a date, make sure Excel recognizes its date and time format.

2
Compare rounded seconds

In an empty cell, enter =ROUND(TIMEVALUE(A1)*86400,0)=ROUND(B1*86400,0) and press Enter. The formula returns TRUE when both values round to the same second.

3
Use the test in an IF formula

If you need a custom result, enter =IF(ROUND(TIMEVALUE(A1)*86400,0)=ROUND(B1*86400,0),"Match","No match") in a cell.

Round Both Excel Times to the Nearest Second
Choose the precision you need: Rounding to the nearest second treats subsecond differences as equal. It does not change the original values in A1 or B1.
Compare times in WPS Spreadsheet

Compare TIMEVALUE Results in WPS Spreadsheet

Use the same rounded-seconds comparison in WPS Spreadsheet to avoid false mismatches caused by tiny differences in time values.

  1. 1. Open the spreadsheet: Open WPS Spreadsheet and use Menu > Open to select your workbook.
  2. 2. Check the values: Place the time text in A1 and a numeric time without a date in B1, or identify the equivalent cells in your sheet.
  3. 3. Enter the comparison: Select an empty cell and enter =ROUND(TIMEVALUE(A1)*86400,0)=ROUND(B1*86400,0), adjusting the cell references if needed.
  4. 4. Review the result: Press Enter and check whether the formula returns TRUE or FALSE. Use the comparison inside IF if you want custom result text.
Compare times to the nearest second with ROUND and TIMEVALUEOpen and save Microsoft Excel XLSX filesUse familiar spreadsheet formulas and cell referencesWork with spreadsheets in the free WPS Office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why do two Excel times that look the same compare as different?

Excel stores times as binary fractions of a day. A TIMEVALUE result and a manually entered time can have tiny underlying differences even when their displayed times match.

Will changing the time format fix the comparison?

No. Home > Number Format changes the display, not the underlying value. Round both values in the comparison formula instead.

Can I use this comparison inside an IF formula?

Yes. For example, enter =IF(ROUND(TIMEVALUE(A1)*86400,0)=ROUND(B1*86400,0),"Match","No match") to return a custom result.

What if TIMEVALUE returns an error?

Check that the text in A1 contains a time Excel recognizes. If it also contains a date, its format must be recognizable under your system's date and time settings.

What if the comparison cell contains a date as well as a time?

A date adds a whole-day value to the cell. To compare only its time portion, use MOD(B1,1) in place of B1 in the rounded comparison.