sirgeoff Newbie
Joined: 06 Apr 2004 Posts: 2
|
Posted: Apr 7th, 2004 03:49 PM Post subject: summing column |
|
|
Is there anyone that could give me direction on summing a column such as D, from the cells first_day to last_day? I appreciate any help you could give.
last_day = subtotal_day - 1
For i = last_day To 1 Step -1
MsgBox "next day back is " & i
different_month_sum = DateDiff("m", CDate(Cells(i, 5).Value), CDate(Cells(i - 1, 5).Value))
If different_month_sum <> 0 Then
MsgBox "first day of the month =" & i
first_day = i
Exit For
End If
Next i |
|