Dim total As Integer
Dim sum As Range
Dim criteria1 As Range
Dim criteria2 As Range
Set criteria1 = Worksheets("Matrix").Range("A1:A10")
Set criteria2 = Worksheets("Matrix").Range("B1:B10")
Set sum = Worksheets("Matrix").Range("C1:C10")
total = Application.WorksheetFunction.SumIfs(sum, criteria1, "Crit1", criteria2, "Crit2", sum, "<>#VALEUR!")