Hi
I have a list of 19 items in column D, i want to count them but exclude 2 specific items "Bags" and "Shoes"
I've tried a couple different ways but I can't get it to work.
I am using the range D:D as there will be more items added to the list
Hi
I have a list of 19 items in column D, i want to count them but exclude 2 specific items "Bags" and "Shoes"
I've tried a couple different ways but I can't get it to work.
I am using the range D:D as there will be more items added to the list
Last edited by Karen13; 09-17-2015 at 05:54 AM.
Maybe something like this...
=COUNTA(D:D)-SUM(COUNTIF(D:D,{"Shoes","Bags"}))
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
Awesome thank you that worked perfectly!!
Perhaps
=SUMPRODUCT(--(ISTEXT(D:D)), --(D:D <> "shoes"),--(D:D <>"bags"))
ChemistB
My 2?
substitute commas with semi-colons if your region settings requires
Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
You're welcome. Thanks for the feedback!
Would I also be able to add to =COUNTA(D:D)-SUM(COUNTIF(D:D,{"Shoes","Bags"})) where column F must contain the word "Return"?
I think
=COUNTIF(F:F, "Return")- SUM(COUNTIFS(D:D,{"Shoes","Bags"}, F:F, "Return"))
as you'd only want to subtract shoes and bags that were returned
Sorry to waste time, I realised what I was doing wrong.. the "Bags" text was a header and I didnt need to count it if i started with the "Return" count
=COUNTIF('F:F,"Return")-COUNTIF(D:D,"Shoes")
Maybe this...
Data Range
D E F 1 Item ------ Status 2 shoes stock 3 bags return 4 cans return 5 flowers ship 6 gowns return 7 shoes ship 8 bags stock 9 hats return 10 11 12 13 14 15
=SUMPRODUCT(--(D2:D15<>""),--ISNA(MATCH(D2:D15,{"Shoes","Bags"},0)),--(F2:F15="Return"))
Result = 3
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks