Hi Everyone!
I'm attempting to calculate the below formula in VBA. However, it returns a type mistmatch error.
Any help would be greatly appreciated =)
dblMyVal = Evaluate("SUMPRODUCT(($H$2:$H$1000)*($A$2:$A$1000=A" & rw & ")*($B$2:$B$1000=B" & rw & ")*($D$2:$D$1000=D" & rw & ")*(MONTH($E$2:$E$1000)=MONTH(E" & rw & "))*(YEAR($E$2:$E$1000)=YEAR(E" & rw & ")))")
I'm attempting to calculate the below formula in VBA. However, it returns a type mistmatch error.
Any help would be greatly appreciated =)
dblMyVal = Evaluate("SUMPRODUCT(($H$2:$H$1000)*($A$2:$A$1000=A" & rw & ")*($B$2:$B$1000=B" & rw & ")*($D$2:$D$1000=D" & rw & ")*(MONTH($E$2:$E$1000)=MONTH(E" & rw & "))*(YEAR($E$2:$E$1000)=YEAR(E" & rw & ")))")