This might give some additional ideas
Names Default To Here(1);
dt = Open("$DOWNLOADS/724991.jmp");
cont_cols = dt << Get Column Names(Continuous, "String");
first_cols = cont_cols[2::N Items(cont_cols)::2];
second_cols = cont_cols[1::N Items(cont_cols)::2];
If(N Items(first_cols) != N Items(second_cols),
Throw("column mismatch");
);
For Each({{col1, col2}}, Across(first_cols, second_cols),
Eval(EvalExpr(
new_col = dt << New Column("Result", Numeric, Continuous, Formula(
Expr(Name Expr(AsColumn(dt, col1))) - Expr(Name Expr(AsColumn(dt, col2)))
));
));
dt << Run Formulas;
new_col << Suppress Eval(1);
);
If you just care about the results, other option is to stack your data, calculate the result to stacked table, split it (might have to add new column for proper result column naming) and join it back
![jthi_0-1708582900793.png jthi_0-1708582900793.png](https://community.jmp.com/t5/image/serverpage/image-id/61343iC601B78C6F2A16BD/image-size/medium?v=v2&px=400)
![jthi_1-1708582924610.png jthi_1-1708582924610.png](https://community.jmp.com/t5/image/serverpage/image-id/61344i3EC38F40F63BFD2D/image-size/medium?v=v2&px=400)
![jthi_3-1708583217261.png jthi_3-1708583217261.png](https://community.jmp.com/t5/image/serverpage/image-id/61346i8F63F4C887C6140C/image-size/medium?v=v2&px=400)
and then JMP is able to create some sort of a script for you
![jthi_2-1708583188281.png jthi_2-1708583188281.png](https://community.jmp.com/t5/image/serverpage/image-id/61345i25BA8794869C50E5/image-size/medium?v=v2&px=400)
-Jarmo