Index/Collect for last non blank value looping

I'm trying to get the last non blank date value if the value that pulls is blank. We have a sheet that make a separate line for each part of a process, and has the dates for each start. The "Start Date" column should fill with the date that corresponds to the Index for that Run. In the below example, they have a start date for Run 1 and Run 3, but not for 2, 4, or 5.


I'm able to get the "Start Date" to fill if the current run is blank, but the row above it has a date (example, run 2 pulls run 1's date and run 4 pulls run 3's date). Is there a way to get the formula to keep looping if the pulled value is also blank (example, run 5 would pull run 4, but that's blank).


Formula I have written now:

=IF([Start Date]@row <> "", INDEX(COLLECT([Start Date]:[Start Date], [Project Name]:[Project Name], [Project Name]@row), Index@row), INDEX(COLLECT([Start Date]:[Start Date], [Project Name]:[Project Name], [Project Name]@row), Index@row - 1))



Thanks!

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!