Here is an example. Please read the LabTalk Guide for more information.
string sbk$ = %H;
string sst$ = page.active$;
int scol = wks.ncols;
int tcol = scol/6;
string bkname$;
newbook result:=bkname;
for(int ii=1; ii<=tcol; ii++)
{
rowstats irng:=[sbk$]sst$!$(ii*6-5):$(ii*6) mean:=[bkname$]sheet1!$(ii) sd:=<optional>;
}
Thanks
Larry