Here is a formula that does what you want, and if there is not a proper look up value found, it changes the cell color to red. Formula below and attached data table
curExp = :Experiment Number;
curStage = :Stage;
:Adjusted Time << color cells( "White", Row() );
at = .;
If(
:Stage == "PR", at = :Time,
:Stage == "SL",
row = Current Data Table() << get rows where( :Experiment Number == curExp & :Stage == "SL" & :Step == "P0" );
If( N Rows( row ) > 0,
at = :Time[row[1]],
:Adjusted Time << Color Cells( "Red", Row() )
);,
:Stage == "ST",
row = Current Data Table() << get rows where( :Experiment Number == curExp & :Stage == "ST" & :Step == "R1" );
If( N Rows( row ) > 0,
at = :Time[row[1]],
:Adjusted Time << Color Cells( "Red", Row() )
);
);
at;
Jim