usercenter93
New Member
- Joined
- Apr 22, 2015
- Messages
- 9
Hello,
I am new to VBA in excel . I have a range of data like 11000 numbers .i want that it calculates the average of first 60 then next 60 till the end . I did some programming but that isint working . So can someone please help me with it .
Sub Hourlyaverage()
Sheets("DUT1_Test51_excel").Select
Range("T2").Select
Do Until Selection.Offset(0, -8).Value = ""
Selection.Formula = "=Average(selection.offset(0,-8):selection.offset(60,-8))"
Selection.Offset(1, 0).Select
Loop
ActiveCell.Offset(1, 0).Select
End Sub
I am new to VBA in excel . I have a range of data like 11000 numbers .i want that it calculates the average of first 60 then next 60 till the end . I did some programming but that isint working . So can someone please help me with it .
Sub Hourlyaverage()
Sheets("DUT1_Test51_excel").Select
Range("T2").Select
Do Until Selection.Offset(0, -8).Value = ""
Selection.Formula = "=Average(selection.offset(0,-8):selection.offset(60,-8))"
Selection.Offset(1, 0).Select
Loop
ActiveCell.Offset(1, 0).Select
End Sub