lior03
06-08-2006, 02:31 PM
hello
the following macro takes a list of dates at one column and data on the second column and seprate every month.how can i use the sum function to
sum every month at each empty row i created
Application.ScreenUpdating = False
Dim iToday As Integer
Dim iYesterday As Integer
selection.CurrentRegion.Select
selection.numberformat = "dddd dd/mm/yyyy "
selection.Font.Bold = True
iYesterday = month(ActiveCell.Value)
Do Until IsEmpty(ActiveCell.Value)
ActiveCell.Offset(1, 0).Select
iToday = month(ActiveCell.Value)
If iToday <> iYesterday Then
ActiveCell.EntireRow.Insert
ActiveCell.Offset(1, 0).Select
End If
iYesterday = iToday
Loop
Application.ScreenUpdating = True
thanks
the following macro takes a list of dates at one column and data on the second column and seprate every month.how can i use the sum function to
sum every month at each empty row i created
Application.ScreenUpdating = False
Dim iToday As Integer
Dim iYesterday As Integer
selection.CurrentRegion.Select
selection.numberformat = "dddd dd/mm/yyyy "
selection.Font.Bold = True
iYesterday = month(ActiveCell.Value)
Do Until IsEmpty(ActiveCell.Value)
ActiveCell.Offset(1, 0).Select
iToday = month(ActiveCell.Value)
If iToday <> iYesterday Then
ActiveCell.EntireRow.Insert
ActiveCell.Offset(1, 0).Select
End If
iYesterday = iToday
Loop
Application.ScreenUpdating = True
thanks