VBA Column Conversion
Sub WriteFormula()
ActiveCell.FormulaR1C1 = "=Sum(A1:A10)"
ActiveCell.Offset(1, 0).Formula = "=sum(R1C1:R10C1)"
End Sub
It might be interesting to note that passing A1 notation to FormulaR1C1 is
not successful regardless of the users setting while passing R1C1 to Formula
seems to work. However, this was a simple test and I can't say that as a
general rule R1C1 will always work with Formula. Personally if I use
FormulaR1C1, I write the formula string as R1C1 and if I use Formula I write
the formula string as A1.
--
Regards,
Tom Ogilvy
"Ron Rosenfeld" wrote in message
...
On Fri, 13 Oct 2006 21:10:34 -0500, Dave Peterson
wrote:
But if you read help as a directive to you (the programmer) how to write
the
formula in code, then maybe it makes more sense???
Yes, it does. I just never read it that way.
--ron
|