Let say I have the data in Excel like:
Amount Quarter Delay
378.07 2018.25 6.00
378.07 2018.25 6.00
844.36 2018.25 3.00
1134.21 2018.25 3.00
1134.21 2018.25 5.00
1512.28 2018.25 4.00
99.42 2018.75 2.00
447.38 2017.25 2.00
646.22 2018.75 2.00
745.64 2018.75 2.00
745.64 2018.75 3.00
572.4 2016.25 8.00
572.4 2016.25 8.00
572.4 2016.25 8.00
The Amount, Quarter and Delay are in column C, D, E respectively.
And I have the following code:
Sub abc()
MsgBox Application.SumIfs(Range("C:C"), Range("D:D"), 2018.25, Range("E:E"), 3)
End Sub
The idea is that I want to take the sum where Quarter = 2018.25 and Delay = 3.
However, in the case that I save the data of Delay and Quarter in an array, let say "d_delay" and "d_quarter", the following code does not work:
Sub abc()
'assume that we have data in d_delay and d_quarter by redim and they have the length of 14
Set d_amount = Range("C2:C15")
MsgBox Application.SumIfs(d_amount, d_quarter, 2018.25, d_delay, 3)
End Sub
Can you give me advice on this?

Ifs and sum when satisfied, it will be nearly as quick.