google sheet with solution
the solution is in this formula :
=map(B2:B, C2:C, lambda(time, weight, if(isbetween(time, value("20:55"), value("21:05")), weight - offset(C2,counta(C3:C99999),0,1,1), iferror(ΓΈ) ) ))
thank you so much!!!