Hi guys, I'm using the following SUMPRODUCT formula in a macro.
But the Red part errors the SUMPRODUCT.
If I change the Excluded range to state the individual cells in the Named Range, it works (As below)
Is it possible to use a Named Range as a condition in a SUMPRODUCT formula?
If so, how would it look?
And is there a neater way to do this than what I'm using?
Thanks Guys
Code:
Range("X5").Formula = "=(SUMPRODUCT(--(Call_Type=""NA""),--(Number_Called<>""Retrieve Voicemail""),--(Number_Called<>""Div to Voicemail""),--([COLOR=Red]Number_Called<>Excluded[/COLOR]),--(Call_Charge>0),(Charged_Seconds))+SUMPRODUCT(--(Call_Type=""V2O""),(Charged_Seconds)))/60"
If I change the Excluded range to state the individual cells in the Named Range, it works (As below)
Code:
Range("X5").Formula = "=(SUMPRODUCT(--(Call_Type=""NA""),--(Number_Called<>""Retrieve Voicemail""),--(Number_Called<>""Div to Voicemail""),--([COLOR=Red]Number_Called<>""13""),--(Number_Called<>""1223""),--(Number_Called<>123),--(Number_Called<>""123""),--(Number_Called<>1234),--(Number_Called<>""1234""),--(Number_Called<>""12455""),--(Number_Called<>12455[/COLOR]),--(Call_Charge>0),(Charged_Seconds))+SUMPRODUCT(--(Call_Type=""V2O""),(Charged_Seconds)))/60"
If so, how would it look?
And is there a neater way to do this than what I'm using?
Thanks Guys