SOLVED

Formula to locate the date from a list of dates that is less than but closest to a specific date

Copper Contributor

I have a column of specific dates (sprint end dates). When determining delivery milestone dates for a project, I need to know which sprint a milestone date falls in. I can look it up manually but where is the fun in that? 

For example: if a project estimate determines a design must be completed by 11/10, I want to know the sprint end date of the sprint it would fall into?

Data Table:
SprintStart DateEnd Date
OCT24-2110/9/202410/22/2024
OCT24-2210/23/202411/5/2024
NOV24-2311/6/202411/19/2024
NOV24-2411/20/202412/3/2024
DEC24-2512/4/202412/17/2024
DEC24-2612/18/202412/31/2024
   
Milestone date:11/10/2024 
Sprint End Date:11/19/2024 

 

4 Replies

@JillF1015 

You can use SUMPRODUCT to obtain the sprint end date:

=SUMPRODUCT((B9>=B2:B7)*(B9<=C2:C7)*C2:C7)

Please see attached sample workbook.

best response confirmed by JillF1015 (Copper Contributor)
Solution

@JillF1015 

Since you didn't state the version of Excel you use, here is a solution designed for 365 

= XLOOKUP(milestone, startDate, endDate,,-1)
1 best response

Accepted Solutions
best response confirmed by JillF1015 (Copper Contributor)
Solution

@JillF1015 

Since you didn't state the version of Excel you use, here is a solution designed for 365 

= XLOOKUP(milestone, startDate, endDate,,-1)

View solution in original post