# Excel running tally

Hi,

I have an Excel sheet that goes something like this:

Column A = Player Name (ex. Mickey Mantle)
Column B = Salary (ex. 10,000.00)
Column C = Team (Yankees)

As I input the player's name, salary, and team, I need a single cell that keeps track of the total salary for a team. So in English, it would be something like, "Keep a running tally of the total salary for the Yankees and keep track of that running tally in Cell M1 (for example).

###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can use the SUMIF function:
=SUMIF(<Range containing value to compare>, <value to compare against>, <Range to sum>)
So for your example, this formula could be entered in M1:
=SUMIF(C2:C500, "Yankees", B2:B500)

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

You use a SUMIF() function

Microsoft site has a great example page showing exactly that type of scenario here  http://office.microsoft.com/en-gb/excel-help/sumif-function-HP010062465.aspx
Author Commented:
Perfect. One more request, if I may...

Let's say I'm trying to achieve parity. So if any team's total salary is less than 90% of the team with the highest salary, I'd like the cell to be colored red.

Would that be possible w/o writing code, etc.?

Thanks.