Hi all

I want to enter an excel formula with putexcel command with loops, so the formula looks like:
Code:
putexcel B25=formula((L4/B4)*100)
over all the rows 25-42 in column B.

I entered the following, however, the resulting table puts the formula in `i' for column B instead of `i+21'
Code:
forvalues i=4/21{
putexcel  B`i+21'=formula((L`i'/B`i')*100)
}

Any suggestions?