Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Level II

Script to Insert Column(s) into the Middle of a Table

Finally checked to see if someone had already posted something like this and didn't see it. It's an irritant to me (maybe not a rational one) that you have to use >Cols > Add Multiple Columns... dialog to simply add a column in the middle of a table. This script mimics Excel's long-time approach: select a number of columns, click a command to insert that same number of columns adjacent to the selected columns.

I have this script pegged in my Cols menu (via the menu customization tool).

dt=current datatable();

col=dt<<get selected columns;


dt<<add multiple columns("boo",nc,after(col[nc]),character);

Article Labels

    There are no labels assigned to this post.

Article Tags