Embedded countif statements?

klynshoe

Board Regular
Joined
Jun 17, 2010
Messages
173
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.

Any advice would be greatly helpful!

EXCEL 2010
 

Some videos you may like

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
Joined
Jan 16, 2014
Messages
5
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
Joined
Jun 17, 2010
Messages
173
Nevermind, I figured out I can accomplish this using COUNTIFS instead. I wasn't familiar with that function and figured it out. woo hoo!
 

Watch MrExcel Video

Forum statistics

Threads
1,123,324
Messages
5,600,956
Members
414,417
Latest member
Nobu

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
Top