Countif based on two different columns?

Garrek

Board Regular
Joined
Aug 22, 2019
Messages
53
I have a data set with two columns of data, let's just say A1-A10 and B1-B10. I'm looking to do a countif, to count 1 time only if a value is present in both A and B. For example, if "X" is in A1 and "Y" is in B1, I would want to count this once, but if either A1 or B1 was missing their respective value, it wouldn't.

Sorry for the weird explanation. Basically I'm looking to combine =COUNTIF(A1:A10,"X") and =COUNTIF(B1:B10,"Y"). Is this possible? Does it make sense?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Is this what you mean
=COUNTIFS(A1:A10,"X",B1:B10,"Y")
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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