Is this what you want?
Excel 2010
| A | B | C | D | E |
---|
names | countries | Y/N | num | | |
Jimmy | USA | No | | | |
Jon | Germany | No | | | |
Rick | Spain | Yes | | | |
Bob | Canada | No | | | |
Mike | France | Yes | | | |
Don | UK | No | | | |
Beth | USA | No | | | |
Jimmy | Spain | yes | | | |
pete | Spain | Yes | | | |
jack | France | No | | | |
mat | USA | No | | | |
Jimmy | Spain | Yes | | | |
Jimmy | Spain | Yes | | | |
<colgroup><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"][/TD]
[TD="align: center"]2[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"][/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"][/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]0[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]4[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]0[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]6[/TD]
[TD="align: center"]8[/TD]
[TD="align: right"]7[/TD]
[TD="align: center"]9[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: center"]10[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"]8[/TD]
[TD="align: center"]11[/TD]
[TD="align: right"]10[/TD]
[TD="align: center"]12[/TD]
[TD="align: right"]11[/TD]
[TD="align: center"]13[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]12[/TD]
[TD="align: center"]14[/TD]
[TD="align: right"]13[/TD]
[TD="align: right"]25[/TD]
</tbody>
Sheet5
[TABLE="width: 85%"]
<tbody>[TR]
[TD]
Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E4[/TH]
[TD="align: left"]=IF(
C4="yes",SUMIFS(D2:D4,B2:B4,"spain",A2:A4,"jimmy"),"")[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E5[/TH]
[TD="align: left"]=IF(
C5="yes",SUMIFS(D3:D5,B3:B5,"spain",A3:A5,"jimmy"),"")[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E6[/TH]
[TD="align: left"]=IF(
C6="yes",SUMIFS(D4:D6,B4:B6,"spain",A4:A6,"jimmy"),"")[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E7[/TH]
[TD="align: left"]=IF(
C7="yes",SUMIFS(D5:D7,B5:B7,"spain",A5:A7,"jimmy"),"")[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E8[/TH]
[TD="align: left"]=IF(
C8="yes",SUMIFS(D6:D8,B6:B8,"spain",A6:A8,"jimmy"),"")[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E9[/TH]
[TD="align: left"]=IF(
C9="yes",SUMIFS(D7:D9,B7:B9,"spain",A7:A9,"jimmy"),"")[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E10[/TH]
[TD="align: left"]=IF(
C10="yes",SUMIFS(D8:D10,B8:B10,"spain",A8:A10,"jimmy"),"")[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E11[/TH]
[TD="align: left"]=IF(
C11="yes",SUMIFS(D9:D11,B9:B11,"spain",A9:A11,"jimmy"),"")[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E12[/TH]
[TD="align: left"]=IF(
C12="yes",SUMIFS(D10:D12,B10:B12,"spain",A10:A12,"jimmy"),"")[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E13[/TH]
[TD="align: left"]=IF(
C13="yes",SUMIFS(D11:D13,B11:B13,"spain",A11:A13,"jimmy"),"")[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E14[/TH]
[TD="align: left"]=IF(
C14="yes",SUMIFS(D12:D14,B12:B14,"spain",A12:A14,"jimmy"),"")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]