Just take this table as an example:
The formula for column 2 is the sum of column 4 plus column 5
How to replace "age", "height" and "weight" in the following code with 2, 4 and 5 respectively?Thank you very much!
dt = Current Data Table();
Column( "age" ) << Formula( :height + :weight );

The reference to the data table pointer "dt" will fail, unless it is available in the JMP session....so in other words, the formula may not work when you open the data table in a new jmp session....or it may be wrong in the new session, if "dt" points to a different data table. Therefore, the reference needs to be added to the formula, so it is there for you to use:
Column(dt,6) << formula(dt=current data table(); As Column(dt,4) + As Column(dt,5));
Note, the formula is also changed. The Column() reference has been removed, since it is redundent.
Also, since the formula know what data table it is pointing to, you can actually reduce the formula to:
Column(dt,6) << formula(As Column(4) + As Column(5));
@lwx228,
Try the following.
dt = Current Data Table();
Column("age") << formula(As Column(column(dt,4)) + As Column(column(dt,5)));