Hi, is there a way of creating a function that can that summarise this array formula?

Function SUMELIG(ByVal rngElig As Range, rngPercentage As Range)
SUMELIG.FormulaArray = "=SUM(IF(ISERROR(rngElig * rngPercentage),0, rngElig))"
End Function
Thanks R