Fix WPS Spreadsheets IF Formula Returning Wrong Result When Comparing Dates
Question details
The user needs to correct an IF formula in WPS Spreadsheets that compares two dates and returns No even when a date appears later, likely because the dates are stored as text.

- Product
- WPS Office Spreadsheets
- Device & OS
- not provided
- Scenario
- Comparing two date cells with =IF(I2>T2,"Yes","No") and expecting a result based on chronological order.
- Observed behavior
- The formula returns No even though the date in I2 appears later than T2, indicating the values are not being evaluated as valid date serial numbers.
Before changing the formula, select both date cells and format them as Number. If they change to serial numbers, the dates are valid; if they still look like dates, the values are stored as text and must be re-entered.
Check Whether the Date Cells Are Stored as Text Using Number Formatting
Use this first to confirm why the IF formula is comparing text instead of date serial numbers.
Select cells I2 and T2, or the two cells used in your IF formula.
Right-click the selected cells and choose Format Cells, then go to the Number tab.
Select Number and click OK. If the cells change to serial numbers such as 45123, they are valid dates. If they still show dates, the values are stored as text.
Re-enter Date Values as Real Dates and Retest the IF Formula
Use this solution when the date cells remain text after Number formatting, so the IF formula can compare actual date serial numbers.
Fix WPS Spreadsheets IF Formula Date Comparisons by Correcting Text Dates
Use WPS Spreadsheets to check the underlying number format of date cells and re-enter dates as valid serial numbers, so IF formulas return the correct Yes or No result when comparing dates.
- 1. Open your workbook in WPS Spreadsheets: Launch WPS Office and open the .xlsx or .xls file that contains the IF date formula.
- 2. Select the date cells: Click the two date cells in the formula, such as I2 and T2.
- 3. Format as Number to test: Right-click, choose Format Cells, go to the Number tab, and click Number. If the cells display serial numbers, the dates are valid; if not, continue to re-enter them.
- 4. Re-enter as Date values: Right-click the cells again, choose Format Cells, go to the Number tab, select Date, and then press F2 and Enter in each cell to re-enter the date.
- 5. Retest the formula: Click the IF formula cell and press Enter. The formula now returns Yes or No based on the actual date order.

Frequently Asked Questions
Why does =IF(I2>T2,"Yes","No") return No when I2 shows a later date?
The dates are likely stored as text, so WPS Spreadsheets compares text strings instead of date serial numbers. Format both cells as Number to verify their underlying values.
How can I check if a date cell is text or a real date?
Select the cell, right-click, choose Format Cells, go to the Number tab, and select Number. A valid date changes to a serial number; a text date remains date-like.
How do I fix text dates so my IF formula works?
Format the cells as Date, then re-enter each value by pressing F2 and Enter or by retyping it. Then click the formula cell and press Enter to retest it.
Will these steps work for Excel files opened in WPS Office?
Yes. WPS Spreadsheets uses the same date serial number logic as Excel and supports .xlsx and .xls formula files.
Do I need to change the IF formula itself?
Usually no. After both date cells are valid serial numbers, the formula =IF(I2>T2,"Yes","No") works without changing its structure.





