How to write count if but not not if

SAMPLEHELP

New Member
Joined
Aug 14, 2023
Messages
5
Office Version
  1. 365
Platform
  1. Windows
I want to count items that are in the skirts dept but not if the sub dept is denim or sweater. How would I write that?

DeptStore SetQtySample StatusExpected XDateSub Dept
JACKETS/OUTERWEAR16JUN1NEW08/31/2023DENIM
SKIRTS16JUN1NEW08/31/2023DENIM
DENIM16JUN1NEW08/31/2023DRESSES
SKIRTS16JUN1NEW08/31/2023DENIM
DRESSES13MAY1NEW08/24/2023SWEATER
DRESSES13MAY1NEW08/24/2023SWEATER
SKIRTS14MAYBOM1NEWSWEATER
SKIRTS14MAYBOM1NEW08/31/2023SKIRTS
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Excel Formula:
=SUMPRODUCT(--(A2:A9="SKIRTS")*(F2:F9<>"DENIM")*(F2:F9<>"SWEATER"),C2:C9)
 
Upvote 0
Excel Formula:
=SUMPRODUCT(--(A2:A9="SKIRTS")*(F2:F9<>"DENIM")*(F2:F9<>"SWEATER"),C2:C9)
This works! Thanks a lot! How do I edit it to say the same thing but only counting items in storesets that have "may" in it?
 
Upvote 0
This will work if "May" is actually a month,where the last 2 entries are not, they are text
Excel Formula:
=SUMPRODUCT(--(A2:A9="SKIRTS")*(F2:F9<>"DENIM")*(F2:F9<>"SWEATER")*(MONTH(B2:B9)=5)*C2:C9)
 
Upvote 0
This will work if "May" is actually a month,where the last 2 entries are not, they are text
Excel Formula:
=SUMPRODUCT(--(A2:A9="SKIRTS")*(F2:F9<>"DENIM")*(F2:F9<>"SWEATER")*(MONTH(B2:B9)=5)*C2:C9)
oh I see. is there anyway to do it where may is text? its not meant to be a month but a name.
 
Upvote 0
Use
Excel Formula:
=SUMPRODUCT(--(A2:A9="SKIRTS")*(F2:F9<>"DENIM")*(F2:F9<>"SWEATER")*--(ISNUMBER(SEARCH("May",B2:B9)))*C2:C9)
 
Upvote 0
Hi, welcome to the forum! Just another option that you could also try.

Excel Formula:
=COUNTIFS(A2:A9,"SKIRTS",F2:F9,"<>DENIM",F2:F9,"<>SWEATER",B2:B9,"*MAY*")
 
Upvote 0
Use
Excel Formula:
=SUMPRODUCT(--(A2:A9="SKIRTS")*(F2:F9<>"DENIM")*(F2:F9<>"SWEATER")*--(ISNUMBER(SEARCH("May",B2:B9)))*C2:C9)
Thank you! it gets a little wonky when I try to add the month function but I appreciate your help.
 
Upvote 0
Hi, welcome to the forum! Just another option that you could also try.

Excel Formula:
=COUNTIFS(A2:A9,"SKIRTS",F2:F9,"<>DENIM",F2:F9,"<>SWEATER",B2:B9,"*MAY*")
This worked! thank you very much!
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,996
Members
452,542
Latest member
Bricklin

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