Enters a value in 10 cells in a column and then sums the values : SUM « Excel « VBA / Excel / Access / Word






Enters a value in 10 cells in a column and then sums the values

 

Sub EnterInfo()
    Dim i As Integer
    Dim cel As Range
    Set cel = ActiveCell
    For i = 1 To 10
        cel(i).Value = 100
    Next i
    cel(i).Value = "=SUM(R[-10]C:R[-1]C)"
End Sub

 








Related examples in the same category

1.Reference worksheet and range by name
2.Use with statement with worksheet