How to Check if a Date Falls in Specific Months in Excel
Question details
Need an Excel formula to return "Yes" when a date falls in January, April, July, or October, and "No" for other months, using arrays or advanced functions instead of long OR conditions. Additionally, looking to check if a cell contains specific text like Apple, Orange, or Grapes.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Categorizing dates into specific quarters or matching particular text values efficiently in spreadsheets without writing repetitive nested formulas.
- Observed behavior
- A clean, concise formula outputting "Yes" or "No" based on the extracted month of a referenced date, or checking text against an array constant or cell range.
Ensure your target cells are properly formatted as dates, and identify the exact cell reference (e.g., D2) you plan to evaluate in your formula.
Use the MOD and MONTH Functions for Periodic Months
The most efficient way to check a repeating mathematical pattern of months (such as months 1, 4, 7, and 10) is by combining the MOD and MONTH functions.
Instead of using a long array or multiple OR statements, you can take advantage of the numerical relationship between January, April, July, and October. Since they are exactly three months apart, dividing their month numbers by 3 always leaves a remainder of 1.
Click on the cell where you want the "Yes" or "No" result to appear.
Type the formula =IF(MOD(MONTH(D2),3)=1,"Yes","No") into the formula bar, replacing D2 with your actual date cell reference.
Press Enter to see the result. You can then drag the fill handle down to apply this formula to other dates in your column.

Check Specific Text Values Using an Array Constant
If you need to check whether a cell matches multiple specific text values (like Apple, Orange, or Grapes), use an inline array constant.
Use MATCH and ISNUMBER for Large Lists of Values
For a large number of allowed values, referencing a range is much cleaner and more efficient than typing them into an array constant.
Easily Manage Formulas and Dates with WPS Spreadsheet
WPS Office offers a powerful Spreadsheet tool that perfectly supports advanced functions like MOD, MONTH, MATCH, and array formulas to help you process dates and text data effortlessly.
- 1. Download and install: Get WPS Office for free from the official website and install it on your device.
- 2. Open your dataset: Launch WPS Spreadsheet and open the file containing the dates or text you need to check.
- 3. Apply advanced functions: Type "=" in any cell to trigger the formula assistant and apply the MOD or MATCH functions effortlessly.

Frequently Asked Questions
Why does the MOD and MONTH formula work for January, April, July, and October?
The MONTH function extracts the numerical month (1, 4, 7, and 10). When you divide these specific numbers by 3 using the MOD function, the remainder is always exactly 1. This mathematical consistency makes it the perfect shortcut for quarterly checks.
Can I use array constants for numbers instead of text?
Yes, you can use an array of numbers in curly brackets. For example, if you prefer not to use the MOD method, you can write =IF(OR(MONTH(D2)={1,4,7,10}),"Yes","No"), which is a perfectly valid alternative array approach.
Why is my MATCH formula returning a #N/A error instead of No?
The MATCH function natively returns an #N/A error if the exact value is not found in your specified range. By wrapping the MATCH function inside the ISNUMBER function, you convert that error into a FALSE logical statement, which allows your IF statement to properly output "No".




