how to change the column format for several columnsHello
I have a table created thru summary feature.
I would like to using a for () loop (target column #3 to #9)
1) change format for fixed dec to Percent
2) add cell color
thank you
Lionel
Re: how to change column format several columns<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Thank you for your fast feedback.
will study the code you proposed 
best regards
Lionel
Re: how to change column format several columnsThere are issues with your code. The code below works, assuming the logic you are specifying is want you want. The only statement that is not a valid statement is the << Justify Text("center"). It is only valid when referring to a display window text box. The other errors are just improper references:
For( ii = 4, ii < 6, ii++,
Column( summary_executive_RNG_alignment, orignal_columns0[ii] ) << Format( "Percent", 10, 1 );
//<
For( RowNum = 1, RowNum <= N Rows( summary_executive_RNG_alignment ), RowNum++,
If( 0 < Column( summary_executive_RNG_alignment, orignal_columns0[ii] )[RowNum] <= 0.6,
Column( summary_executive_RNG_alignment, orignal_columns0[ii] ) << color cells( "RED", RowNum ),
If( 0.6 < Column( summary_executive_RNG_alignment, ii )[RowNum] <= 0.9,
Column( summary_executive_RNG_alignment, orignal_columns0[ii] ) << color cells( "Blue", RowNum ),
Column( summary_executive_RNG_alignment, orignal_columns0[ii] ) << color cells( "GREEN", RowNum )
)
)
);
);
Re: how to change column format several columnsJim,
I was trying to get a double For to address all row (as in your example) and multiple columns ...
but no success. Any idea?
For(ii=4, ii<11, ii++,
Column(summary_executive_RNG_alignment, orignal_columns0[ii])
<< Format("Percent", 10, 1 );
<< justify text("center");
For( RowNum = 1, RowNum <= N Rows( summary_executive_RNG_alignment ), RowNum++,
If( 0 < Column( summary_executive_RNG_alignment, orignal_columns0[ii])[RowNum] <= 0.6,
Column( summary_executive_RNG_alignment, orignal_columns0[ii] ) << color cells( "RED", RowNum ),
If(0.6 < Column( summary_executive_RNG_alignment, ii ) <= 0.9,
Column( summary_executive_RNG_alignment, orignal_columns0[ii]) << color cells( "Blue", RowNum ),
Column( summary_executive_RNG_alignment, orignal_columns0[ii]) << color cells( "GREEN", RowNum )
)
)
)
);
Re: how to change column format several columnsHello Jim
ok just using the column property (table, column number) ...
the set color is cool. JMP allows data manipulation in a nice way ...
thank ou very much.
very instructive post
Re: how to change column format several columnsHere is some sample code that I think will give you guidance on how to change the formats and the cell colors
Names Default To Here( 1 );
dt = Current Data Table();
// Change the formats
For( i = 3, i <= 9, i++,
Column( dt, i ) << Format( "Percent", 9, 2 )
);
// Set cell colors
For( rownum = 1, rownum <= N Rows( dt ), rownum++,
If( Column( dt,3 )[RowNum] <= .5,
Column( dt,3 ) << color cells( "Blue", RowNum ),
Column( dt,3 ) << color cells( "Green", RowNum )
)
);