I have below sample extract of movement of deals from the CRM. I use the formula: =MAX(INDEX(($A$2:$A$21=1)($D$2:$D$21<$P$2)$D$2:$D$21,)), where P2 is a date, to