Here is a modification of your code using the Big Class data table as an example.
Names Default To Here( 1 );
Open( "$SAMPLE_DATA/big class.jmp" );
debug = 1;
Ptable = Current Data Table();
col list = Ptable << Get Column Names( String );
If( debug == 1,
Print( col list )
);
// Columns are going to be added to the data table. The For() clause
// will change the end point of the looping if ncols() is in the
// termination value
ncolumns = N Cols( Ptable );
For( i = 1, i <= ncolumns, i++,
If( Contains( col list[i], "eight" ),
// The formula equation needs to be fully parsed before applying it to
// the columns definition
Eval(
Substitute(
Expr(
New Column( col List[i] || " (kPa)",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Selected,
Formula(
(((15 / (0.016 * Num( :age[1] ))) * Num( _col_ )) - 3.75) * 6.89476
)
)
),
Expr( _col_ ), parse(col list[i] )
)
)
)
);
Jim