Using "Big Class.jmp".
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt<<New Column("rows",formula(if(contains(name,"B"),row())));dt<<run formulas;Column("rows")<<deleteFormula;
When a name contains the letter "B", the line number of that name is written to a different variable.
For example: r1=8;r2=9;r3=17...

Thanks!