=COUNTIFS Not working correctly?

Dubyah

New Member
Joined
Mar 30, 2015
Messages
20
Hey Guys,

Im running into an issue with my =countifs formula it is as follows. Some how the total is off...

=COUNTIFS('Nov-11-2015-'!N2:N748,"*B1*",'Nov-11-2015-'!J2:J748,"*Small*")
=COUNTIFS('Nov-11-2015-'!N2:N748,"*B1*",'Nov-11-2015-'!J2:J748,"*Medium*")
=COUNTIFS('Nov-11-2015-'!N2:N748,"*B1*",'Nov-11-2015-'!J2:J748,"*Large*")
=COUNTIFS('Nov-11-2015-'!N2:N748,"*B1*",'Nov-11-2015-'!J2:J748,"*XLarge*")

criteria1 = Batch ( I have 4 different batches ) (B1,B2,S1,S2) However S1 and S2 do not require a size.
criteria2 = Size

I want the formula to count all B1 if small, medium, large, XLarge. Which it seems to be doing yet my range is only 748 cells and my totals are over 800 which DOES NOT MAKE SENSE!

I have also attached an example file....
Unfortunately I cant include the entire range..
 
Last edited:

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Whoops forgot to include formulas...


Excel 2010
ABCDEFGHIJKLM
1SizeGift MessageLast ShipmentReceived ShipmentsNext Shipment
2LargeB2B1, S1, B2S2
3LargeB2B1, S1, B2S2
4LargeB2B1, S1, B2S2
5LargeB2B1, S1, B2S2Up Coming Shipment
6XLargeB2B1, S1, B2S2
7XLargeB2B1, S1, B2S2S1S2BRIEFS1BRIEFS2
8SmallB2B1, S1, B2S2SMALL60173490
9MediumB2B1, S1, B2S2MEDIUM1011055121
10MediumB2B1, S1, B2S2LARGE1011833107
11MediumB2B1, S1, B2S2XL426929TOTAL
12LargeB2B1, S1, B2S2TOTAL30451131347833
13LargeB2B1, S1, B2S2
14LargeB2B1, S1, B2S2
15LargeB2B1, S1, B2S2
16MediumB2B1, S1, B2S2
17LargeB2B1, S1, B2S2
18LargeB2B1, S1, B2S2
19MediumB2B1, S1, B2S2
Sheet1
Cell Formulas
RangeFormula
I8=COUNTIFS($E$2:$E$748,"*S1*",$A$2:$A$748,"*Small*")
I9=COUNTIFS($E$2:$E$748,"*S1*",$A$2:$A$748,"*Medium*")
I10=COUNTIFS($E$2:$E$748,"*S1*",$A$2:$A$748,"*Large*")
I11=COUNTIFS($E$2:$E$748,"*S1*",$A$2:$A$748,"*XLarge*")
I12=SUM(I8:I11)
J8=COUNTIFS($E$2:$E$748,"*S2*",$A$2:$A$748,"*Small*")
J9=COUNTIFS($E$2:$E$748,"*S2*",$A$2:$A$748,"*Medium*")
J10=COUNTIFS($E$2:$E$748,"*S2*",$A$2:$A$748,"*Large*")
J11=COUNTIFS($E$2:$E$748,"*S2*",$A$2:$A$748,"*XLarge*")
J12=SUM(J8:J11)
K8=COUNTIFS($E$2:$E$748,"*B1*",$A$2:$A$748,"*Small*")
K9=COUNTIFS($E$2:$E$748,"*B1*",$A$2:$A$748,"*Medium*")
K10=COUNTIFS($E$2:$E$748,"*B1*",$A$2:$A$748,"*Large*")
K11=COUNTIFS($E$2:$E$748,"*B1*",$A$2:$A$748,"*XLarge*")
K12=SUM(K8:K11)
L8=COUNTIFS($E$2:$E$748,"*B2*",$A$2:$A$748,"*Small*")
L9=COUNTIFS($E$2:$E$748,"*B2*",$A$2:$A$748,"*Medium*")
L10=COUNTIFS($E$2:$E$748,"*B2*",$A$2:$A$748,"*Large*")
L11=COUNTIFS($E$2:$E$748,"*B2*",$A$2:$A$748,"*XLarge*")
L12=SUM(L8:L11)
M12=SUM(I12:L12)
E2=IF(C2="","B1",IF(C2="B1","S1",IF(C2="S1","B2",IF(C2="B2","S2"))))
E3=IF(C3="","B1",IF(C3="B1","S1",IF(C3="S1","B2",IF(C3="B2","S2"))))
E4=IF(C4="","B1",IF(C4="B1","S1",IF(C4="S1","B2",IF(C4="B2","S2"))))
E5=IF(C5="","B1",IF(C5="B1","S1",IF(C5="S1","B2",IF(C5="B2","S2"))))
E6=IF(C6="","B1",IF(C6="B1","S1",IF(C6="S1","B2",IF(C6="B2","S2"))))
E7=IF(C7="","B1",IF(C7="B1","S1",IF(C7="S1","B2",IF(C7="B2","S2"))))
E8=IF(C8="","B1",IF(C8="B1","S1",IF(C8="S1","B2",IF(C8="B2","S2"))))
E9=IF(C9="","B1",IF(C9="B1","S1",IF(C9="S1","B2",IF(C9="B2","S2"))))
E10=IF(C10="","B1",IF(C10="B1","S1",IF(C10="S1","B2",IF(C10="B2","S2"))))
E11=IF(C11="","B1",IF(C11="B1","S1",IF(C11="S1","B2",IF(C11="B2","S2"))))
E12=IF(C12="","B1",IF(C12="B1","S1",IF(C12="S1","B2",IF(C12="B2","S2"))))
E13=IF(C13="","B1",IF(C13="B1","S1",IF(C13="S1","B2",IF(C13="B2","S2"))))
E14=IF(C14="","B1",IF(C14="B1","S1",IF(C14="S1","B2",IF(C14="B2","S2"))))
E15=IF(C15="","B1",IF(C15="B1","S1",IF(C15="S1","B2",IF(C15="B2","S2"))))
E16=IF(C16="","B1",IF(C16="B1","S1",IF(C16="S1","B2",IF(C16="B2","S2"))))
E17=IF(C17="","B1",IF(C17="B1","S1",IF(C17="S1","B2",IF(C17="B2","S2"))))
E18=IF(C18="","B1",IF(C18="B1","S1",IF(C18="S1","B2",IF(C18="B2","S2"))))
E19=IF(C19="","B1",IF(C19="B1","S1",IF(C19="S1","B2",IF(C19="B2","S2"))))
 
Upvote 0
Hey

just had a quick glance at it, but because of the "*large*" the Xlarge is included in that count as well, so Xlarge is counted twice, which would explain why the result is higher than the actual rows

Julian
 
Upvote 0
Interesting, that's kind of a DUH moment.. Ill try adjusting the size names and let you know.
 
Upvote 0

Forum statistics

Threads
1,214,587
Messages
6,120,406
Members
448,958
Latest member
Hat4Life

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