Countif or SumProduct

gtd526

Well-known Member
Joined
Jul 30, 2013
Messages
660
Office Version
  1. 2019
Platform
  1. Windows
Hello,
Getting the wrong count using this formula (G2). Array give me the same result.
Thanks.

NBA.xlsm
ABCDEFG
1TeamATS>ATSFavsTest
2HOU9L4
3CLE-9W-4.9CLE
4ATL-8W-6.1ATL
5ORL8L
6MIA5.5WMIA
7PHI-5.5L-6.1
8LAL1W
9DAL-1L-1.1DAL
10IND-1.5L0.3
11MIL1.5WMIL
12NO-3.5L-9.7NO
13OKC3.5W
14CHA3.5WCHA
15SAN-3.5L-3.6
16MIN4.5W
17DEN-4.5L-4.2DEN
18MEM-2.5W-0.7MEM
19POR2.5L
20WAS-2.5L-4.3WAS
21SAC2.5W
22LAC9.5L
23UTA-9.5W1.7UTA
Sheet1
Cell Formulas
RangeFormula
G2G2=SUMPRODUCT(($A$2:$A$23=$E$2:$E$23)*($D$2:$D$23>0)*($C$2:$C$23="W"))
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Check that the "blank" cells in column D are in fact empty.
 
Upvote 0
Hi GTD256,

It returns me a 1, which is what I'd expect.

GTD256.xlsx
ABCDEFG
1TeamATS>ATSFavsTest
2HOU9L1
3CLE-9W-4.9CLE
4ATL-8W-6.1ATL
5ORL8L
6MIA5.5WMIA
7PHI-5.5L-6.1
8LAL1W
9DAL-1L-1.1DAL
10IND-1.5L0.3
11MIL1.5WMIL
12NO-3.5L-9.7NO
13OKC3.5W
14CHA3.5WCHA
15SAN-3.5L-3.6
16MIN4.5W
17DEN-4.5L-4.2DEN
18MEM-2.5W-0.7MEM
19POR2.5L
20WAS-2.5L-4.3WAS
21SAC2.5W
22LAC9.5L
23UTA-9.5W1.7UTA
Sheet1
Cell Formulas
RangeFormula
G2G2=SUMPRODUCT(($A$2:$A$23=$E$2:$E$23)*($D$2:$D$23>0)*($C$2:$C$23="W"))
 
Upvote 0
Try

=SUMPRODUCT(($A$2:$A$23=$E$2:$E$23)*($D$2:$D$23>0)*ISNUMBER(D$2:D$23)*($C$2:$C$23="W"))

M.
 
Upvote 0
Solution

Forum statistics

Threads
1,216,076
Messages
6,128,670
Members
449,463
Latest member
Jojomen56

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