Okay, found an issue with all of this. If I change a cartridge it doesn't try to reference the new value

So, the question is in the PPD in the below equation how would i force the (G19-( portion to reference the last time it was equal to K24 OR G19? Also, this could be applied to the )-B19) portion as well.

=(G19-(LOOKUP(2,1/(C19:C42<>0),G19:G42)))/((LOOKUP(2,1/(C19:C42<>0),B19:B42)-B19))