Function Problems

Find the Earliest Date for a Month and Year in Excel

Amos GikundaAmos Gikunda Nov 18, 2026 868 views

Question details

Find the earliest posting date for a selected month and year on a month-specific worksheet.

Find the Earliest Date for a Month and Year in Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Define the date range

Select Formulas > Name Manager > New. Name the range PostDates and set Refers to to =INDIRECT("'"&SUBSTITUTE(NisConMth,"'","''")&"'!$B$9:$B$1009").

2
Set the month boundaries

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).

3
Enter the formula

In the result cell, enter =IFERROR(MIN(FILTER(PostDates,(PostDates>=D1)*(PostDates<E1))),"No matching date") and press Enter.

4
Format the result

Select the result cell and choose a Date format from Home > Number so the date appears instead of its serial number.

Use FILTER to find the earliest matching date in Excel 365
Check the worksheet and range: The formula shows “No matching date” when FILTER finds no dates, but IFERROR can also hide errors such as an invalid worksheet name. Check NisConMth and PostDates if the result is unexpected.
Find dates in WPS Spreadsheet

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. 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. 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. 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. 4. Format the result: Select the result cell and use the Home tab's number-format controls to display it as a date.
Find the earliest posting date within a selected monthOpen and edit Microsoft Excel XLSX and XLS filesUse familiar spreadsheet formulas and date formattingWork with worksheets in a free office suite
microsoft office alternative - wps office

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.