nick_clarke
New Member
- Joined
- Aug 26, 2010
- Messages
- 27
I've developed a sumproduct function that works perfectly when ran within my worksheet, however I am receiving a type 13 mismatch error when attempting to use this via VBA. My code is as follows:
dim t as integer
t = Evaluate("=SUMPRODUCT(('Sheet 1'!$W$2:$W$15994>=B19)*(('Sheet 1!$W$2:$W$15994<=B20))*('Sheet 1'!$V$2:$V$15994="M - filed as complete")")
txttest1.Value = t
I'm sure it is something to do with the "M - filed as complete" within the final criteria section, but I am not sure what the problem is.
I've been searching the internet for hours trying to find a solution and I would be really grateful if someone could please help me.
Thanks
dim t as integer
t = Evaluate("=SUMPRODUCT(('Sheet 1'!$W$2:$W$15994>=B19)*(('Sheet 1!$W$2:$W$15994<=B20))*('Sheet 1'!$V$2:$V$15994="M - filed as complete")")
txttest1.Value = t
I'm sure it is something to do with the "M - filed as complete" within the final criteria section, but I am not sure what the problem is.
I've been searching the internet for hours trying to find a solution and I would be really grateful if someone could please help me.
Thanks