Thank you, your examples are always great!
I know that the value can only happen once in the file, so I made a while loop instead so that it would not continue to check the other columns for it.
file = Pick File();
dt = Open (file);
for(i=1, i<=ncols(dt), i++,
column(dt,i) << data type(Character);
column(dt,i) << set modeling type(continuous);
);
nCols = dt << Get Column Names ("Character");
found =0;
search_string = "Vtlin";
i=1;
While (found == 0,
match_rows = dt << get rows where(as column(dt, nCols)==search_string);
if(nrows(match_rows) > 0, found = 1, i++);
if(i==nCols, found =1, );
);
vtlinCol = i;