using count if function

aryanaveen

Board Regular
Joined
Jan 5, 2015
Messages
104
Hi All,

I am looking for a formula where I can count based on 2 criteria.

Example
ABCDEFGH
1NaveenABAACD
2PraveenCDffff
3Abhayddgggf
4Prakashdfiaia
5Giridjfjka

<tbody>
</tbody>

In the above table I want to count number of "A" in range "C1:H5" where Column B is having "Naveen". Please note "Naveen" can be in any row under column B.


Please help
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Please note "Naveen" can be in any row under column B.

Hi, if Naveen can only appear once in column B then you can try this:


Excel 2013/2016
ABCDEFGHIJ
1ABCDEFGHNaveen
21NaveenABAACD3
32PraveenCDffff
43Abhayddgggf
54Prakashdfiaia
65Giridjfjka
Sheet1
Cell Formulas
RangeFormula
J2=COUNTIFS(INDEX($C$2:$H$6,MATCH(J1,$B$2:$B$6,0),0),"A")
 
Upvote 0
Have a look at this:
=SUMPRODUCT(--(B1:B5="Naveen"),--EXACT(C1:C5,"A"))
This is case sensitive for "A"
 
Upvote 0
Try
Code:
=COUNTIFS($B$1:$B$5,"Naveen",$C$1:$C$5,"A")+COUNTIFS($B$1:$B$5,"Naveen",$D$1:$D$5,"A")+COUNTIFS($B$1:$B$5,"Naveen",$E$1:$E$5,"A")+COUNTIFS($B$1:$B$5,"Naveen",$F$1:$F$5,"A")+COUNTIFS($B$1:$B$5,"Naveen",$G$1:$G$5,"A")+COUNTIFS($B$1:$B$5,"Naveen",$H$1:$H$5,"A")
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,732
Members
448,987
Latest member
marion_davis

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