Problem with a loop and column references
Hi again,
Am Thu, 4 Dec 2014 08:27:43 +0100 schrieb Claus Busch:
Sub mySum()
or try:
Sub mySum2()
Dim i As Long, LRow As Long
With Sheets("Sheet1")
For i = 28 To 89
If i Mod 5 < 2 Then
LRow = .Cells(Rows.Count, 1).End(xlUp).Row
.Cells(LRow + 1, i).Formula = "=SUM(" & Cells(1, i).Address & _
":" & Cells(LRow, i).Address & ")"
End If
Next
End With
End Sub
Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
|