Hi Julio,
I think you can try the stats X-Function.
Suppose you have selected some rows of a column and want to save the mean of them to a variable named mymean and their sd to mysd. Use the following script:
stats mean:=mymean sd:=mysd;
mymean=;
mysd=;
Please see more details on this X-Function here:
http://www.originlab.com/www/helponline/Origin8/en/mergedProjects/X-Function/X-Function/Stats.html
Deanna
OriginLab Technical Services