Excel running tally


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).

Thanks in advance.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Shaun KlineLead Software EngineerCommented:
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

Your issues matter to us.

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

Start your 7-day free trial
Neil RussellTechnical Development LeadCommented:
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
Go-BruinsAuthor 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.?

JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Neil RussellTechnical Development LeadCommented:
Yes, have a cell that calculates the MAX() of the range of cells with your SUMIFS in and then use conditional formatting on your sumif cells using that answer cell.
Shaun KlineLead Software EngineerCommented:
That is a job for conditional formatting. You can use the "Use a formula to determine cells to format". The formula would look something like: =A1<MAX(A1:A22)*0.9.
Go-BruinsAuthor Commented:
Excellent. Thank you!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.