How about this in O29:
=LET(period,     5,
     value,      I14:W14,
     flag,       I23:W23,
     startvalue, FILTER(value,value<>""),
     start,      FILTER(COLUMN(value),value<>""),
     writtenoff, startvalue/period*(COLUMN()-start),
IF(O23="",
   "",
   startvalue-writtenoff))
If you would drag this down/left/right, this would also take into account the 2 values for the convertor belts, for instance.