Excel VisualBasic Script

Sub EnterAvg()
    If TypeName(Selection) <> "Range" Then Exit Sub
End Sub