How to Use Excel IF Formula to Check a Range of Days
Question details
Determine how to return different results based on whether the current day of the month falls within a sequential range or matches an explicitly listed array of days.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Setting up a dynamic formula that evaluates the current date using DAY(TODAY()) and categorizes it into specific day ranges (e.g., 1-7, 8-14) or explicitly listed non-sequential days (e.g., 30, 31, 1-8).
- Observed behavior
- The user needs an efficient nested formula structure without excessively repeating conditions, replacing complex nested IF statements with cleaner alternatives like IFS, LET, or XMATCH.
Ensure that your computer's system clock is accurate, as the TODAY() function relies on your operating system's date and time settings to return the correct day.
Use IFS and LET Functions for Sequential Day Ranges
This method is highly recommended when you need to categorize a month into continuous sequential blocks, such as weekly periods.
The LET function allows you to define a variable for the current day, preventing you from repeatedly typing DAY(TODAY()). Combined with the IFS function, it evaluates multiple conditions sequentially and returns the first true match.
Click on the cell where you want the conditional result to appear.
Type the formula: =LET(d, DAY(TODAY()), IFS(d<=7, "this", d<=14, "that", TRUE, "something else")).
Press the Enter key. The formula will evaluate the current day of the month and return "this" for days 1 through 7, "that" for days 8 through 14, and "something else" for any day after the 14th.

Use XMATCH for Explicitly Listed Non-Sequential Days
Use this solution when your target days wrap around the end and beginning of a month, or when they do not form a single continuous sequence.
Easily Build Advanced Date Formulas with WPS Spreadsheet
WPS Office provides full support for advanced logical functions like LET, IFS, and XMATCH. You can effortlessly manage complex date ranges and conditions within your worksheets.
- 1. Open your workbook: Launch WPS Spreadsheet and open the document where you need to check date ranges.
- 2. Select a cell: Click on the cell where you want to insert the formula.
- 3. Input the date formula: Type your formula, such as =LET(d, DAY(TODAY()), IFS(d<=10, "Early", TRUE, "Late")).
- 4. Confirm the input: Press Enter to instantly see the result based on today's date.

Frequently Asked Questions
Can I use the OR function instead of XMATCH for explicitly listed days?
Yes, you can use the OR function, though it makes the formula much longer. For example, you can write =IF(OR(DAY(TODAY())=30, DAY(TODAY())=31, DAY(TODAY())=1), "this", "that"). However, the XMATCH method with an array is preferred for keeping your formula clean and readable.
Why is my formula using TODAY() not updating to the new day?
The TODAY() function is volatile and updates automatically when the worksheet recalculates. If it hasn't updated, check if automatic recalculation is turned off in your formula settings, or press F9 on your keyboard to force a manual recalculation.
Are LET, IFS, and XMATCH functions supported in all spreadsheet versions?
No, LET, IFS, and XMATCH are newer functions introduced in modern updates like Office 365, Excel 2021, and recent versions of WPS Office. If you are using an older spreadsheet version, you will need to rely on traditional nested IF and MATCH functions.




