Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

Inserts a formula in cell A11 of a worksheet that calculates the sum of the values in the range A2

Sub formal()     Dim formulaString As String     formulaString = "=SUM($A$2:$A$10)"     Cells(11, "A").Formula = formulaString End Sub