How to Classify Excel Dates as June or July Using Date Boundaries in WPS Office
Question details
The user needs an Excel formula in WPS Office Spreadsheet that classifies dates as "June" before 14 July 2023 and "July" after 15 July 2023, while keeping the explicit boundary dates easy to adjust.

- Product
- WPS Office Spreadsheet
- Device & OS
- not provided
- Scenario
- A user has date values in a column and needs to categorize them as June or July using fixed date cut-offs instead of calendar month grouping.
- Observed behavior
- The formula should return June for dates before 14 July 2023, July for dates after 15 July 2023, and leave 14-15 July blank unless the boundary conditions are changed.
Check that the dates in column D are real Excel date serial values, not text. If the dates are stored as text, convert them or use DATEVALUE in the formula before applying the date boundaries.
Use an IF and DATE Formula for Explicit June or July Boundaries
Best when you need exact control over boundary dates and want 14-15 July 2023 to remain blank until you decide how they should be assigned.
This formula uses DATE to create explicit boundaries, so the logic is easy to read and modify. The nested IF returns June for dates before 14 July, July for dates after 15 July, and blank for the two boundary dates.
Click the cell where you want the classification to appear, for example E2.
Type =IF(D2<DATE(2023,7,14),"June",IF(D2>DATE(2023,7,15),"July","")) and press Enter.
Use the fill handle at the lower-right corner of E2 and drag down to apply the formula to the remaining date rows.

Use a TEXT Formula with a Day Shift for Continuous Month Labels
Use this shorter alternative when you want a continuous month label and do not need 14-15 July to remain blank.
Classify Dates as June or July in WPS Office Spreadsheet
Open your workbook in WPS Office Spreadsheet, enter the IF and DATE formula in a helper column, and fill it down to classify dates as June, July, or blank for boundary dates. WPS Office uses the same formula logic as Microsoft Excel and saves .xlsx files without compatibility issues.
- 1. Open the workbook in WPS Office Spreadsheet: Launch WPS Office, open your .xlsx workbook, and select the sheet that contains the dates in column D.
- 2. Select the result cell: Click the first cell where you want the June or July classification to appear, such as E2.
- 3. Enter the IF and DATE formula: Type =IF(D2<DATE(2023,7,14),"June",IF(D2>DATE(2023,7,15),"July","")) and press Enter.
- 4. Fill the formula down: Drag the fill handle from E2 down through the rows that contain the dates you want to classify.
- 5. Adjust boundary dates if needed: Change the comparison operators or add another IF condition to assign 14 and 15 July to June or July explicitly.

Frequently Asked Questions
What happens to dates on 14 and 15 July 2023?
With the recommended formula, both dates return an empty string (""). You can change the comparison operators to <= or >= to assign them to June or July.
Can I use this formula for a different date column or year?
Yes. Replace D2 with your actual date cell, and change DATE(2023,7,14) and DATE(2023,7,15) to the boundary dates you want to use.
Will this formula work in both WPS Office Spreadsheet and Microsoft Excel?
Yes. IF and DATE are standard functions supported by both WPS Office Spreadsheet and Microsoft Excel, and the workbook can be saved in .xlsx format.
Why does my formula return #VALUE! or classify a text date incorrectly?
This usually means the date cell is stored as text instead of a real date. Convert the cell to a date format or wrap the reference in DATEVALUE, such as DATEVALUE(D2).
Can I classify more than two months using boundaries?
Yes. You can nest additional IF conditions or use functions like IFS or VLOOKUP with a boundary table for more than two categories.




