Count the Sumproduct of two arrays (one column and one row)

Deleven

New Member
Joined
May 15, 2018
Messages
2
Hello

Could someone please explain how to count a sumproduct of two arrays? I need to count the number of cells that are not 0 after calculating a sumproduct.

The COUNTIFS formula below (see screenshot) does not work. #VALUE ! is returned.



It is just a testing sample. Of course, I would have to apply the formula to a far more complex dataset.

However, in this sample, the result should be:
A1*C1 = 1*0.5 = 0.5 > 0 = 1
A2*D1 = 1*0 = 0
A3*E1 = 0*0.25 = 0
A4*F1 = 1*0.85 = 0.85 > 0 = 1
A5*G1 = 0*0.88 = 0
A6*H1 = 1*0.46 = 0.46 >0 = 1

So the final result of the count should be 3.

How is this accomplished with a formula?

Thank you very much for the help.

Best,
Daniel
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
You'd do better to post more than one row of test data and to explain in words what you're trying to achieve.
 
Upvote 0
I went just over it again and found out that it would also be possible to skip the SUMPRODUCT and just use a COUNTIFS with two criteria.

The value in the column as well as in the row has to unequal 0.

This would be the formula: =COUNTIFS($A$1:$A$6;"<>0";$C1:$H1;"<>0")

I would have to transpose the row data:

=COUNTIFS($A$1:$A$6;"<>0";TRANSPOSE($C1:$H1);"<>0")

However, the TRANSPOSE does not seem to work in a COUNTIFS formula. Is there any other alternative to using the TRANSPOSE in COUNTIFS?
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top