With Range("g3:g30") .Formula = "= AVERAGEIFS(B:B,C:C,"">"" & (ROW() - 2.2),C:C, ""<"" & (ROW() - 1.2))" .Value = .Value End With