Countifs & sumproduct with multiple curly bracket not calculating correctly

fayez_MrExcel

Active Member
Joined
Oct 29, 2005
Messages
437
Office Version
  1. 365
Platform
  1. Windows
I have a table where i want to count records with multiple criteria having multiple curly brackets, but it seems it is not calculating correctly. In below table, im expecting the result count as 4, but the countifs is giving me 1 only and sumproduct is returning #N/A

CopyofTerminatedEmployments-Component1 (4).csv
ABCDEFGH
1
2TypeItemCartFormula UsedResult
3OfficePenBox 1COUNTIFS1
4KitchenForkBox 2SUMPRODUCT#N/A
5OfficeMonitorBox 1
6GardenPotBox 1
7KitchenKnifeBox 2
8OfficeMonitorBox 3
9KitchenKnifeBox 1
10KitchenSpoonBox 3
11OfficePencilBox 2
12KitchenPlateBox 1
13GardenShovelBox2
14
15
Sheet3
Cell Formulas
RangeFormula
G3G3=SUM(COUNTIFS($B$3:$B$13,{"Office","Kitchen"},$C$3:$C$13,{"Pen","Monitor","Knife"},$D$3:$D$13,{"Box 1","Box 2"}))
G4G4=SUMPRODUCT(($B$3:$B$13={"Office","Kitchen"})*($C$3:$C$13={"Pen","Monitor","Knife"})*($D$3:$D$13={"Box 1","Box 2"}))
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Unfortunately you cannot use syntax like that in those functions. What about this?

22 10 31.xlsm
ABCDEG
1
2TypeItemCartResult
3OfficePenBox 14
4KitchenForkBox 2
5OfficeMonitorBox 1
6GardenPotBox 1
7KitchenKnifeBox 2
8OfficeMonitorBox 3
9KitchenKnifeBox 1
10KitchenSpoonBox 3
11OfficePencilBox 2
12KitchenPlateBox 1
13GardenShovelBox 2
Count
Cell Formulas
RangeFormula
G3G3=SUM(((B3:B13="Office")+(B3:B13="Kitchen"))*((C3:C13="Pen")+(C3:C13="Monitor")+(C3:C13="Knife"))*((D3:D13="Box 1")+(D3:D13="Box 2")))
 
Upvote 0
Alternative 1 The data is in an Excel Table
Alternative 2 Sumproduct

T202210a.xlsm
ABCDEFG
1
2Count 4
3
4TypeItemCart
5OfficePenBox 1
7OfficeMonitorBox 1
9KitchenKnifeBox 2
11KitchenKnifeBox 1
16
17
18
19
20
21TypeItemCartFormula UsedResult
22OfficePenBox 1
23KitchenForkBox 2SUMPRODUCT4
24OfficeMonitorBox 1
25GardenPotBox 1
26KitchenKnifeBox 2
27OfficeMonitorBox 3
28KitchenKnifeBox 1
29KitchenSpoonBox 3
30OfficePencilBox 2
31KitchenPlateBox 1
32GardenShovelBox2
33
5d
Cell Formulas
RangeFormula
D2D2=SUBTOTAL(103,Table2[Cart])
G23G23=SUMPRODUCT(--(ISNUMBER(MATCH($B$22:$B$32,{"Office","Kitchen"},0))),--(ISNUMBER(MATCH($C$22:$C$32,{"Pen","Monitor","Knife"},0))),--(ISNUMBER(MATCH($D$22:$D$32,{"Box 1","Box 2"},0))))
 
Upvote 0

Forum statistics

Threads
1,214,573
Messages
6,120,318
Members
448,956
Latest member
Adamsxl

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