# Adding the combined results of two columns

#### jkchild

##### Board Regular
Hi

I have two columns Q & V. In column Q the answer will be Y or N, the same for column V.

What I want to do is have a formula in one cell that counts when there is a Yes in both columns. Therefore if there are 20 Y's in column Q and 10 in column V. The result would be 10. As there are 10 Y's in both columns.

I have tried MATCH, various counts, so I am either using the wrong formula, or I am putting my brackets in the wrong place.

Thanks
J

### Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
The way that I read it, you want to return the value of the lowest count of "Y"s. In that case, use "=MIN(COUNTIF(Q:Q,"Y"),COUNTIF(V:V,"Y"))"

Otherwise, I have read it incorrectly...

Try

=SUMPRODUCT(--(Q1:Q10="Y"),--(V1:V10="Y"))

I don't think either of them works.

I will try and re-explain.

I want to know how many times there is a match of Y in both columns Q & V.

Col Q Col V Count
N Y 0
Y Y 1
N N 0
Y Y 1
Y N 0
Y Y 1

Therefore the answer is 3. However I want to formulate this in one cell
Thank you

That's what barry's formula does. How did it not work?

Ooops, it might help if I linked the formula to the right sheet!!!!!

Thanks Barry works well.

If you don't mind, can you explain why you use the --
Thanks
J

The simple explanation is that SUMPRODUCT works with numbers not TRUE/FALSE values. The -- coerces TRUE values to 1 and FALSE values to 0.

Right, I get it. Many thanks :wink:

Replies
3
Views
122
Replies
1
Views
231
Replies
7
Views
358
Replies
11
Views
574
Replies
6
Views
258

1,218,899
Messages
6,145,085
Members
450,590
Latest member
Naneng

### 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.

### Which adblocker are you using?

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

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