# SUMIF with INDEX MATCH Issue

#### clarkerots

##### New Member
I have the following data:

 A B C D E 1 Team 1 1 Team 2 2 2 Team 3 2 Team 4 1 3 Team 1 1 Team 3 2 4 Team 4 1 Team 1 2 5 Team 2 2 Team 1 1 6 7 Team 1-Wins Team 1-Losses

<tbody>
</tbody>

Whenever a team wins, a 1 is entered manually into Column B or Column D. Whenever a team loses, a 2 is entered into Column B or Column D. I'm trying to create a formula that will give me Team 1 wins in B7, and Team 1 losses in D7. I'm guessing that a SUMIF would cover the task of totaling 1's or 2's, but whenever I try to couple it with a INDEX MATCH in order to sum just Team 1 information, I can only get it to read the first instance of Team 1. The final formula should read the 1's in B1, B3, and D5 to give Team 1 3 wins in B7, and read the 2's in D4 to give Team 1 1 loss in D7. Is there a way to accomplish this combination? Any help appreciated greatly!

#### FormR

##### MrExcel MVP
Hi, something like this maybe:

#### bosco_yip

##### Well-known Member
Or,

[B7] =COUNTIFS(A1:C5,"Team 1",B1:D5,1)

[D7] =COUNTIFS(A1:C5,"Team 1",B1:D5,2)

Regards

Last edited:

#### clarkerots

##### New Member
That is awesome. Thank you both!

1,078,442
Messages
5,340,305
Members
399,366
Latest member
ahmed elsaid

### This Week's Hot Topics

• Problem with Radio Button's format control
I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
• Last Display on userform to a Listbox
[CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
• Rename and move files to a new location
Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
• Help with True/False Formula
Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
• Clear extra characters from a provided range of cells
Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
• Help with Current and highest streaks
Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...