There is no need for a loop.....Taking @jthi example and adding a second row to his example table, one can see that it will add as many columns as found.
![txnelson_0-1717183463526.png txnelson_0-1717183463526.png](https://community.jmp.com/t5/image/serverpage/image-id/64705i40A227B06FC53E32/image-dimensions/745x188?v=v2)
Now the additional issue that one might want the binary columns to line up and have the same number of columns generated. Here is a modification that accomplishes that
![txnelson_1-1717184598897.png txnelson_1-1717184598897.png](https://community.jmp.com/t5/image/serverpage/image-id/64706i69F3EF7CD466D4FD/image-dimensions/750x212?v=v2)
Names Default To Here( 1 );
dt = New Table( "Untitled",
Add Rows( 1 ),
Compress File When Saved( 1 ),
New Column( "Column 1", Character, "Nominal", Set Values( {"1011", "11010110"} ) )
);
max length = Col Max( Length( :Column 1 ) );
fill = Repeat( "0", max length );
For Each Row(
:Column 1 = Substr( fill, 1, max length - Length( :Column 1 ) ) || :Column 1
);
dt << New Column( "Separated",
Character,
"Nominal",
Formula( Concat Items( Words( :Column 1, "" ), "|" ) )
);
dt << Text to Columns( columns( :Separated ), Delimiters( "|" ) );
Jim