# How to reference cell to the left (Excel)

I'm trying to do some calculations based on team results in Excel. The format is:

``````Team | Player | Yards
A   |   x    |  100
B   |   y    |  142
A   |   z    |   93
``````

I'd like to be able to sum all the yards for a particular team, so for example if there are several players from team A then it sums their yardage. How would I go about doing this?

The dataset is long enough that it is impractical to do it all manually.

NXW
• 11
• 2
• 3

You can use the formula SUMIF

For example, if your team is in the A column, the players are in the B column and the Yards are in the C column, you can use the formula like this:

``````=SUMIF(A:A, "A", C:C)
``````

which sums the yards of the team A.

Insane
• 2,892
• 6
• 26
• 49
RedSave
• 11
• 1

Use a SUMIF formula. See below:

A SUMIF formula will add the values if a certain condition is true which is exactly what you are asking for.

Eric F
• 3,319
• 5
• 24
• 42
• While the animation looks cool and flashy, it really serves no purpose here and actually makes your answer harder to follow than a typed formula. – Excellll Nov 05 '15 at 16:43
• @Excellll That's your opinion however this shows how the formula changes. Since this is a rather basic question that was asked, I figured he could see the formula differences on each line. Thank you for your opinion though – Eric F Nov 05 '15 at 17:08

This is really easy with a Pivot Table (Insert > Pivot Table). Select `Team` as Row lables and choos the Sum of `Yards` as Values:

agold
• 248
• 3
• 9