Sub 수식입력()
    
    Range("F6").Value = WorksheetFunction.Sum(Range("D6:D14"))
    Range("I6").Value = WorksheetFunction.AverageIf(Range("C6:C14"), Range("H6"), Range("D6:D14"))
    Range("I6").AutoFill Destination:=Range("I6:I10")

End Sub