Excel - If a cell contains a value then sum another cell.

Asked By DM on 15-Nov-08 12:17 AM
I am trying to find a formula that can sum the value of a cell if it contains
a certain value.

For example:

I have 100 sales that were made and 10 sales people.  Each sales person has
different sales $$ volume that they done.  So I want to find the TOTAL sales
volume for each sales person.

Their sales volume is in one column and their name is in another.  I need a
formula that will give me the toal volume for example sum C2 if B2 = Bob.


="to" & CHAR(95) & "sheeloo" & CHAR(64) & "hotmail.com" replied on 15-Nov-08 12:43 AM

This will sum up Col C values where corresponding cell in Col B is Bob.
Adjust 100 to the last row with your data...

Put you saelpeople in, say, Col D and enter this in E1
=SUMPRODUCT(--($B$1:$B$100=E1),($C$1:$C$100)) and copy down
T. Valko replied on 15-Nov-08 02:16 AM
Try this...

A1:A100 = names
B1:B100 = sales (numeric values)

List the unique names in a range of cells, say, D1:D10

Enter this formula E1 and copy down to E10:


Microsoft Excel MVP
T. Valko replied on 15-Nov-08 02:29 AM
Ooops! typo:

The correct formula should be:


Microsoft Excel MVP