1. If you are going to be working in JSL, you need to take the time to read the Scripting Guide: Help==>Books==>Scripting Guide
2. Below is a simple script that generates the coloring as you described
Names Default To Here( 1 );
dt = Current Data Table();
colNamesList = dt << get column names( string );
For( theRow = 1, theRow <= N Rows( dt ), theRow++,
For( theCol = 2, theCol <= N Items( colNamesList ), theCol++,
If(
:Target[theRow] > Column( dt, colNamesList[theCol] )[theRow],
Column( dt, colNamesList[theCol] ) << color cells( "Red", theRow );
.;,
Column( dt, colNamesList[theCol] )[theRow] < :Target[theRow] + (.02 *
Abs( :Target[theRow] )) & Column( dt, colNamesList[theCol] )[theRow] >
:Target[theRow] - (.02 * Abs( :Target[theRow] )),
Column( dt, colNamesList[theCol] ) << color cells( "Yellow", theRow );
.;,
Column( dt, colNamesList[theCol] ) << color cells( "Green", theRow );
.;
)
)
);
Jim