I have a series of cells with values i.e.
I would like to have a for loop that is doing the average of the first value in column A (1), the adjacent value in column B (3) and the adjacent value in column C (74). I would need the user to choose this range with a msgbox.
So far I could code this, with the help from the macro recording:
Sub averager()
Dim ran As Range, average As Variant, cell1 As Variant, cell2 As Variant
Dim i As Variant
Set ran = Application.InputBox(Prompt:="Enter range values: ", Type:=8)
For i = 0 To i = 8
ran.Offset(0, 13).Select
ActiveCell.FormulaR1C1 = "=AVERAGE(RC[-13]:RC[-11])"
average = WorksheetFunction.average(ran.Text)
Next i
End Sub
However, this code doesn't perform the loop and it returns only the first triplicate's average in the offset position I chose.
How can the loop perform the operation for all the values?