Find the Earliest Date for a Month and Year in Excel
Question details
Find the earliest posting date for a selected month and year on a month-specific worksheet.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Posting dates are stored in B9:B1009 on a worksheet selected by NisConMth, and NisConYr identifies the selected year.
- Observed behavior
- The desired result is the earliest date within the selected month and year, such as August 2022.
Check that B9:B1009 contains real Excel dates, NisConMth contains the exact worksheet name, and NisConYr contains the selected year. Choose two empty cells on the formula worksheet for the start and end of the month.
Use FILTER to find the earliest matching date in Excel 365
Use this method in Excel versions that support FILTER to return the earliest date in the selected month and year.
Select Formulas > Name Manager > New. Name the range PostDates and set Refers to to =INDIRECT("'"&SUBSTITUTE(NisConMth,"'","''")&"'!$B$9:$B$1009").
In an empty cell such as D1, enter =DATE(NisConYr,8,1) for August. Replace 8 with the selected month number, and make sure NisConMth names the matching month worksheet. In E1, enter =EDATE(D1,1).
In the result cell, enter =IFERROR(MIN(FILTER(PostDates,(PostDates>=D1)*(PostDates<E1))),"No matching date") and press Enter.
Select the result cell and choose a Date format from Home > Number so the date appears instead of its serial number.

Use an array formula in older versions of Excel
Use MIN and IF when your Excel version does not support FILTER.
Find the earliest monthly date in WPS Spreadsheet
Open your workbook in WPS Spreadsheet and use month boundaries with MIN and IF to find the earliest posting date on the relevant worksheet.
- 1. Open the workbook: In WPS Spreadsheet, choose Open and select your Excel workbook. Confirm that the month worksheet contains dates in B9:B1009.
- 2. Set the date boundaries: On the worksheet where you want the result, enter =DATE(2022,8,1) in an empty cell D1 and =EDATE(D1,1) in E1. Adjust the year and month as needed.
- 3. Find the earliest date: In an empty result cell, enter =IF(COUNTIFS('August'!B9:B1009,">="&D1,'August'!B9:B1009,"<"&E1)=0,"No matching date",MIN(IF(('August'!B9:B1009>=D1)*('August'!B9:B1009<E1),'August'!B9:B1009))) and confirm with Ctrl+Shift+Enter. Replace August with the relevant worksheet name.
- 4. Format the result: Select the result cell and use the Home tab's number-format controls to display it as a date.

Frequently Asked Questions
Why does the result show a number instead of a date?
Excel stores dates as serial numbers. Select the result cell and choose a Date format from Home > Number.
What if the month worksheet contains dates from another month?
Use the D1 and E1 month boundaries in the formulas above. They include dates on or after the first day of the selected month and exclude dates on or after the first day of the next month.
Can I use MIN alone on the month worksheet?
Yes. If every date in B9:B1009 belongs to the intended month and year, enter =MIN('August'!B9:B1009). Otherwise, use the filtered formula to exclude dates outside the selected period.
Why is the formula not finding a date I can see?
Check that the date in B9:B1009 is stored as a real date rather than text, and verify that NisConMth names the correct worksheet and NisConYr contains the intended year.




