Embedded countif statements?

klynshoe

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

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
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...
 
Upvote 0
Nevermind, I figured out I can accomplish this using COUNTIFS instead. I wasn't familiar with that function and figured it out. woo hoo!
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,720
Members
448,986
Latest member
andreguerra

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