count Values in column B only if value in column A meets criteria (on the same row)

ener

New Member
Joined
Feb 2, 2013
Messages
22
5a
7b
6a
3b
2a
4a
3c
3a

<tbody>
</tbody>

Hi guys, hopefully that's quite simple for some of you to answer. I have 2 columns which are NOT next to each other just shown here this way for simplification.

Now I want to look at Column A (the one with the numbers) and every time there is the number 3 it should look at Column B in the same row and count if there is either an 'a' or 'c' in there. So in this example the total count would be 2. First 3 has corresponding 'b' so no count next 3 has corresponding 'c' so count is 1 and last 3 has corresponding 'a' so total count is 2.

I am hoping to accomplish this without VBA and maybe a formula like DCOUNTA or something simpler.

Hope someone can help.

Thanks
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
I know that there has to be a better way than this. But a way that works is better than none.

=COUNTIFS(A1:A8,3,B1:B8,"a")+COUNTIFS(A1:A8,3,B1:B8,"c")
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,383
Members
448,955
Latest member
BatCoder

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