Assign dates as late as possible without duplicates

dfer4343

New Member
Joined
Aug 9, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello,

I'm looking for a formula that will populate Column C below, using the list from Column E:

Screenshot 2024-08-09 123650.png


Column C must contain dates that:
  • Must be from Column E
  • Does not repeat (no duplicates)
  • Occurs prior to the date from Column B
  • Occur as late as possible, given the constraints above (major challenge is to produce as late as possible)

I have tried the RANK function, helper columns, and even differentiating duplicates to no avail.

Any thoughts?

Latest Production Date.xlsx
ABCDE
1Production Run #Latest Production DateActual Production Date ?Potential Production Dates
216/10/20253/26/2025
326/17/20254/9/2025
436/23/20255/3/2025
547/5/20255/7/2025
657/5/20255/11/2025
767/8/20255/25/2025
877/8/20256/8/2025
987/14/20256/12/2025
1097/17/20256/16/2025
11107/25/20256/20/2025
12118/14/20256/22/2025
13128/22/20257/6/2025
147/10/2025
157/14/2025
167/18/2025
178/1/2025
188/15/2025
198/19/2025
Sheet1
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
You could use the MAXIFS function starting from the last run (#12) and have the formula work up to the previous runs.

Put this in C13 (run #12)
Excel Formula:
=MAXIFS(E$2:E$19, B13>E$2:E$19)
This returns the last production date previous to the last run.

Put this in C12 and copy it up to C2
Excel Formula:
=MAXIFS(E$2:E$19,B12>E$2:E$19,C13>E$2:E$19)
This returns the last production date previous to the run and previous to the next run below.


Results:
Production Run #Latest Production DateActual Production Date ?Potential Production Dates
1​
6/10/2025​
5/25/2025​
3/26/2025​
2​
6/17/2025​
6/8/2025​
4/9/2025​
3​
6/23/2025​
6/12/2025​
5/3/2025​
4​
7/5/2025​
6/16/2025​
5/7/2025​
5​
7/5/2025​
6/20/2025​
5/11/2025​
6​
7/8/2025​
6/22/2025​
5/25/2025​
7​
7/8/2025​
7/6/2025​
6/8/2025​
8​
7/14/2025​
7/10/2025​
6/12/2025​
9​
7/17/2025​
7/14/2025​
6/16/2025​
10​
7/25/2025​
7/18/2025​
6/20/2025​
11​
8/14/2025​
8/1/2025​
6/22/2025​
12​
8/22/2025​
8/19/2025​
7/6/2025​
7/10/2025​
7/14/2025​
7/18/2025​
8/1/2025​
8/15/2025​
8/19/2025​
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,341
Members
452,638
Latest member
Oluwabukunmi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top