View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Roger on Excel Roger on Excel is offline
external usenet poster
 
Posts: 249
Default VBA formula question

I use the following type of code to place formulas in cells :

For Each cell In Range("A1:A2")

cell.Offset(, 1).FormulaR1C1 = "=RC[10]&RC[8]&RC[15]"
'Equiv
cell.Offset(, -1).FormulaR1C1 =
"=IF(ISERROR(RC[5]/r4c13),""Data?"",RC[3]/r4c13)"
Next

This works fine, however my question is whether one can perform the
calculations in the code and just place the result into the cells?

I guess this may require learning a whole new syntax for coding the
equations, but I was wondering if someone could give me some pointers?

Many Thanks,

Roger