B
bioyyy
I got an error: (Run-time error '1004': Application-defined or object-defined
error).
Thanks,
Sub Avg3Row()
Dim OutputRow As Integer
OutputRow = 1
For Row = Selection.Row To ActiveSheet.UsedRange.Rows.Count Step 30
Worksheets("Output").Cells(OutputRow, 1).Formula = "=average(Input!B" &
Row - 3 & ":B" & Row & ")"
OutputRow = OutputRow + 1
Next Row
End Sub
error).
Thanks,
Sub Avg3Row()
Dim OutputRow As Integer
OutputRow = 1
For Row = Selection.Row To ActiveSheet.UsedRange.Rows.Count Step 30
Worksheets("Output").Cells(OutputRow, 1).Formula = "=average(Input!B" &
Row - 3 & ":B" & Row & ")"
OutputRow = OutputRow + 1
Next Row
End Sub