How to Return Values for Matching Date Ranges in Excel
Question details
The user needs an Excel formula to identify which date range contains a specific effective date and return the corresponding value from a designated column.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Extracting corresponding data across columns based on whether a specific effective date falls within dynamically checked date ranges.
- Observed behavior
- The user wants to construct a dynamic formula utilizing functions like LET, DATEVALUE, and IF to match date bounds and output values accurately across comparable columns.
Ensure your effective dates are formatted correctly as actual date values in Excel, and verify that your target range headers or bounds are recognizable by Excel's date functions rather than just plain text.
Use the LET and IF Functions to Match Date Ranges
This solution combines LET, DATEVALUE, IF, and AND to dynamically determine if an effective date falls within a specific month's range and returns the appropriate value.
The LET function simplifies the formula by assigning a name to the calculation result, improving readability and preventing redundant calculations. In this case, we use it to define the start date and check if it aligns with the effective date range.
Click on the cell where you want the first matched value to appear (for example, F9).
Input the formula =LET(d,DATEVALUE("1-"&$B9),IF(AND(d<=$C$4,d>F$6-DAY(F$6)),$D9,"")) into the formula bar and press Enter.
Select the cell with the applied formula, click and hold the fill handle at the bottom right corner, and drag it down for the remaining rows, then drag it across to apply it to comparable columns.

Process Date Range Formulas with WPS Spreadsheet
WPS Spreadsheet fully supports advanced Excel functions like LET, DATEVALUE, and IF, allowing you to seamlessly calculate date ranges and extract data without any compatibility issues.
- 1. Open your file in WPS Office: Launch WPS Office and open your spreadsheet document containing the date ranges and effective date.
- 2. Enter the matching formula: Click on the target output cell and input the provided LET and IF combination formula.
- 3. Drag to fill the range: Use the fill handle at the bottom right of the active cell to drag the formula across your desired rows and columns to apply the logic instantly.

Frequently Asked Questions
Why is the DATEVALUE function returning a #VALUE! error?
This happens if the text string provided to DATEVALUE cannot be recognized as a valid date format by your system's regional settings. Ensure the concatenated text accurately represents a recognizable date format.
Can I use this formula in older versions of Excel?
The LET function is available in Microsoft 365, Excel 2021, and modern WPS Office versions. If you are using an older version of Excel, you will need to replace the 'd' variable with the actual DATEVALUE calculation repeated inside the IF function.
How do I adjust the formula if my effective date is in a different cell?
Simply replace the absolute reference $C$4 in the formula with the new cell address containing your effective date, ensuring you keep the dollar signs if the reference should remain locked when copying the formula across other cells.




