I am still confused as to what "Mean" you are referring to? But, the code below takes a guess at one of the possible means to compare with, and from it sets the cell with the max difference from the mean.
Names Default To Here( 1 );
// Open the sample data table
dt = Open( "$SAMPLE_DATA/blood pressure.jmp" );
// Loop across rows to find what cells have the max values
For Each Row(
// Find the mean for the target columns in the row
rowMean = Mean( :BP 8M, :BP 12M, :BP 6M, :BP 8W, :BP 12W, :BP 6W, :BP 8F, :BP 12F, :BP 6F );
// Initialize the memory variables to hold the max value and the column the max value is in
MaxVal = 0;
Col = 0;
// Loop across the columns in question and find the max value
For( i = 1, i <= 9, i++,
If( Abs( Column( i + 2 )[Row()] - rowMean ) > MaxVal,
MaxVal = Abs( Column( i + 2 )[Row()] - rowMean );
Col = i + 2;
)
);
// Set the cell color for the cell that has the max value
Column( col ) << color cells( "red", Row() );
);
Jim