Sorry, the formula to pick up the temperature corresponding to the prior populated viscosity did not deal correctly with multiple consecutive blanks. Hopefully the MAXIFS formula below corrects the problem
= MAXIFS(temp, KViscosity, "<>", temp, "<="&temp)
= MINIFS(temp, KViscosity, "<>", temp, ">="&temp)
p.s. A dynamic array formula that is of interest for this task is
= XLOOKUP( temp, IF(KViscosity,temp), temp, , {-1,1} )