Excel 2010 - sum a row of values based on an adjacent cell's value

AxeTracks
AxeTracks used Ask the Experts™
on
Row A has text entries of; Employee, Contractor, Temp
Row B has a number (cost)

I want to sum all the values in Row B that have an adjacent Row A value of "Employee"
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
AlanConsultant
Commented:
Try this:

=sumproduct((A:A="Employee")*(B:B))

Alan.

Commented:
you can use following formula
for example if you have value starting in B2 and end value cell is B50

=SUM(B2:B50)
Most Valuable Expert 2011
Awarded 2010
Commented:
@Alan3285,
although it is possible to use Sumproduct on a whole column in Excel 2010, it should never be used like that, unless you really want to slow down the calculation in Excel.

Sumif is what's needed here, and full column references are OK.

=Sumif(B:B,"Employee",B:B)

If you need to sum all the other possible entries too, a Pivot Table might be a better approach.

cheers, teylyn
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Author

Commented:
I'm sorry but I'm not understanding the anwsers.  I've attached a simple file with example.  I want D3 to be the sum of the values C6 through C10 which have the adjacent cell in row B equal to Employee
Most Valuable Expert 2011
Awarded 2010

Commented:
Can you try attaching again? I don't see an attachment in your question nor your comment.

Author

Commented:
Bingo,  your example worked for me teylyn.  Thanks!

Author

Commented:
thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial