This solution makes use of two helper columns*, D and E, with the respective formulas:![]()
=IF(B2=0,"",ROW())
The formula in column C is:![]()
=IF(B2=0,"",IFERROR(LARGE(INDIRECT(ADDRESS(ROW()-1,4)&":D1"),1),1))
*Helper columns can be hidden for aesthetic purposes.![]()
=IF(B2=0,"",D2-E2)
Here is a copy of your file with the helper columns and formulas applied: Copy of example IFERROR(LARGE(INDEX(ADDRESS....xlsx
Let me know if you have any questions.
Bookmarks