Excel help

Soldato
Joined
17 Mar 2009
Posts
6,679
Location
Nottingham
Quick question as im having a brain melt session at work

Simplified version:

I have 2 columns with data in each. lets say both contain a simple YES or NO comment.

I only want to count the number of cells where for example both column A and B contain the variable of Yes. on the same line

Im familiar with for example =countif(A1:A85, "yes") to return the number of cells with 1 argument but want it to only count if its assessing both columns and only counting where both are Yes

I assumed and failed hard that it would be something like: =countif(A1:A85, "yes")And(B1:B85, "yes")

Can anyone help my excel noobishness
 
If you need to do it one time: Custom sort where you sort by first column and then by second column, then just count the rows.

If you don't want to move data or need a repeatable value i can't help but i'm bored and trying to figure it out :D
 
=SUMPRODUCT((range1="yes")*(range2="yes"))

Haha! Yea, or COUNTIFS. I learned my trade mostly prior to coutifs and sumifs.
 
Last edited:
A---B----C-------D
1--yes--no--- =countif(a1:b1, "Yes") (returns 1)
2--yes--yes-- =countif(a2:b2, "Yes") (returns 2)
3--no---no---- =countif(a3:b3, "Yes") (returns 0)

Edit: The above works fine for me.
 
Back
Top Bottom