Embedded countif statements?

klynshoe

Board Regular
Hello,

I have the following formula which provides a % value of any cell within the range specified that is a 1 or 2.

=(COUNTIF(Metrics!\$P\$3:\$P\$12,1)+COUNTIF(Metrics!\$P\$3:\$P\$12,2))/COUNT(Metrics!\$P\$3:\$P\$12)

I would like to narrow this down even further by only counting the values in the range where the cell in \$B2 (Column B) equals a particular value. At first I tried an IF/THEN stmt but that only gave me the one count in that row, instead of counting everything with that value in Column B. Now I'm stuck! I may have to an array of sorts buy my experience with arrays is limited so I would need add'l assistance in setting that up if that's the best way to go about it.

EXCEL 2010

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

dropanddrive03

New Member
I'm not sure if I correctly understand your question. Have you tried just changing the 1 and 2 to cell references? Assuming you have, can you either embed the sheet or send a dropbox link or something like that? It's much easier to help when I can see exactly what you're doing...

klynshoe

Board Regular
Nevermind, I figured out I can accomplish this using COUNTIFS instead. I wasn't familiar with that function and figured it out. woo hoo!

Replies
4
Views
233
Replies
4
Views
839
Replies
1
Views
335
Replies
2
Views
234
Replies
5
Views
348

1,172,141
Messages
5,879,277
Members
433,417
Latest member
Razor_Rob

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.

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

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