Sub test()
If Cells(9, 4) <> "" Then
With Cells(11, 4)
.FormulaR1C1 = "=AVERAGE(R[1]C:R[4]C)"
Cells(11, 4) = CDbl(Format(Cells(11, 4), "##,##0.00"))
.Font.Bold = True
End With
With Cells(15, 4)
.FormulaR1C1 = "=AVERAGE(R[1]C:R[5]C)"
Cells(15, 4) = CDbl(Format(Cells(15, 4), "##,##0.00"))
.Font.Bold = True
End With
With Cells(20, 4)
.FormulaR1C1 = "=AVERAGE(R[1]C:R[3]C)"
Cells(20, 4) = CDbl(Format(Cells(20, 4), "##,##0.00"))
.Font.Bold = True
End With
With Cells(23, 4)
.FormulaR1C1 = "=AVERAGE(R[1]C:R[3]C)"
Cells(23, 4) = CDbl(Format(Cells(23, 4), "##,##0.00"))
.Font.Bold = True
End With
End If
End Sub