If it doesn't matter that the order is changed, using Associative Arrays is one option
Names Default To Here(1);
dt1 = Open("$DOWNLOADS/List values.jmp");
Column(dt1, "List") << Data Type("Numeric");
dt2 = Open("$DOWNLOADS/Bins.jmp");
aa_listvalues = Associative Array(Column(dt1, "List"));
dt2 << New Column("BinsList", Character, Nominal, << Set Each Value(
If(!IsMissing(:Bins),
r_aa = Associative Array(Parse(:Bins));
r_aa << Intersect(aa_listvalues);
If(N Items(r_aa) > 0,
Substitute(Char((r_aa << get keys)), "}", "]", "{", "[", ",", " ");
,
""
);
,
""
);
));
Not sure why 410 wouldn't be removed on Row 10
-Jarmo