docjackson33

New Member
Joined
Feb 7, 2010
Messages
18
I need to count a list of rank, and using the countifs seemed the proficient way, however I cant get it to work. Here's the formula I currently have, but it keeps returning a zero. I've tried the insert function but to no avail.

=COUNTIFS($E:$E,"PVT",$E:$E, "PV2",$E:$E, "PFC",$E:$E, "SPC",$E:$E, "CPL")

Thanks in advance,

Jonathan
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
This works

=COUNTIF(E:E,"PVT"), one for each variant
 
Upvote 0
Thanks Barry, that's one less advil I'll need to take. Can you explain why the countifs is not working without the sum though?
 
Upvote 0
With COUNTIFS the only rows counted are those that satisfy all the conditions so a formula like this would make sense

=COUNTIFS(A:A,"x",B:B,"y")

that will count rows where column A = "x" and column B = "y" but if you do this

=COUNTIFS(A:A,"x",A:A,"y")

....you'll always get zero because no cell can be "x" and "y"

With the version I suggested you are, in essence, using 5 COUNTIF formulas in one, the result of

=COUNTIF($E:$E,{"PVT","PV2","PFC","SPC","CPL"})

is an array of 5 values, e.g. if there were two PVTs in the range and three each of the rest that would give you this array

{2,3,3,3,3} and the SUM just sums those values to give the total
 
Upvote 0

Forum statistics

Threads
1,215,756
Messages
6,126,692
Members
449,330
Latest member
ThatGuyCap

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