Forum Discussion
Countifs question.
Hi,
Why is cell L4 1 in this eacample. Contifs with 2 condistions.
=COUNTIFS(F3:F8;B3;G3:G8;">"&J3:J8)
And what COUNTIFS returns:
With first condition we iterate records with Tyskland. First one has 1, with second condition we iterate all records in second position counting where the score is less than 1. It gives 1,1,0,1,0,0. When repeat the same with second Tyskland. Since it has zero, comparing with scores in second column we have 0,0,0,0,0,0. No more Tyskland, sum one with another and have result which we have.
- Martin_AngostoIron Contributor
Try this:
=BYROW(IF((G3:G8>J3:J8)*(F3:F8=B3),"Win","No win"),LAMBDA(r,IF(r="Win",1,0)))
See attached.
Martin
- Hogstad_RaadgivningSteel Contributor
Thank you Martin_Angosto
But I am still confused why L4 shows 1 in the previous picture. And i L13:L16 here:
I guess what you would like to return against each pair: If
- Germans played this match
- They played at home (i.e. they are in first column)
- They won (first column number is more than in second one)
then we return 1 else 0.
If so
=(F3:F8=B3)*(G3:G8>J3:J8)