Sub MM1()
Dim lc As Integer, x As Double
lc = Cells(1, Columns.Count).End(xlToLeft).Column 'change the row number to the row you need instead of 1
x = Application.WorksheetFunction.Average(Range(ActiveCell.Offset(0, 2), ActiveCell.Offset(0, lc)))
MsgBox x
End Sub