Good afternoon,

I'm trying to run a loop and have the results of some calculations put into Excel. However, the results aren't being written to Excel. Does anyone know what my mistake is? Here's the code:
Code:
putexcel set results  
forvalues i=1/64 {  
     local j = `i' + 64  
     quietly ttest var`i' == var`j', unpaired  
     local diff = `r(mu_1)'- `r(mu_2)'  
     putexcel A`i' = `diff'  
     putexcel B`i' = `r(t)'  
 }
Thank you,
Stanley