Fix Excel TIMEVALUE Comparisons That Return False
Question details
Compare a TIMEVALUE result with a manually entered time when both appear identical but the comparison returns 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.
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.
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.
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.
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.
If you need a custom result, enter =IF(ROUND(TIMEVALUE(A1)*86400,0)=ROUND(B1*86400,0),"Match","No match") in a cell.

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. Open the spreadsheet: Open WPS Spreadsheet and use Menu > Open to select your workbook.
- 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. 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. 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.

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.




