Hello,
I am working within a VBA userform that has two comboboxes:
cboYourName
cboOppName
Once values have been selected from these comboboxes, it will return a value in the subsequent textbox that is based on this formula:
=CONCATENATE("AFF: ",SUMPRODUCT(--($W$2:$W$13=$W$18),--($X:$X=$X$18)),"/NEG: ",SUMPRODUCT(--($W:$W=$X$18),--($X:$X=$W$18)))
The formula works if it is in the worksheet itself, but I am having some trouble once I put it in to VBA. The "$W$18" and "$X$18" criterion I need to be the values of cboYourName and cboOppName respectively.
Can someone point me in the right direction on how to programmatically input sumproduct formulas in Excel VBA?
Thanks,
Zack
I am working within a VBA userform that has two comboboxes:
cboYourName
cboOppName
Once values have been selected from these comboboxes, it will return a value in the subsequent textbox that is based on this formula:
=CONCATENATE("AFF: ",SUMPRODUCT(--($W$2:$W$13=$W$18),--($X:$X=$X$18)),"/NEG: ",SUMPRODUCT(--($W:$W=$X$18),--($X:$X=$W$18)))
The formula works if it is in the worksheet itself, but I am having some trouble once I put it in to VBA. The "$W$18" and "$X$18" criterion I need to be the values of cboYourName and cboOppName respectively.
Can someone point me in the right direction on how to programmatically input sumproduct formulas in Excel VBA?
Thanks,
Zack