ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional Adding/Totaling (https://www.excelbanter.com/excel-discussion-misc-queries/3843-conditional-adding-totaling.html)

JoJoBinkus

Conditional Adding/Totaling
 
I have 2 columns, one is "cost" which is in currency form, and the other is
"salesperson".....(there are only 2 salespeople)

At the bottom of my sheet I have 3 squares, one for saleperson1,
saleperson2, and grand total....

I know how to show the grand total by totaling the whole column....

But how do I total the costs of 1 particular salesperson? In psuedo-code like:

If COLUMN B, ROW1 = "Tim" then Add COLUMN A, ROW1 to the total square at the
bottom for salesperson1...

Does anyone know how to do this?

Thanks!!!

Jason Morin

Use SUMIF. For an example, see:

http://www.techonthenet.com/excel/formulas/sumif.htm

HTH
Jason
Atlanta, GA

-----Original Message-----
I have 2 columns, one is "cost" which is in currency

form, and the other is
"salesperson".....(there are only 2 salespeople)

At the bottom of my sheet I have 3 squares, one for

saleperson1,
saleperson2, and grand total....

I know how to show the grand total by totaling the whole

column....

But how do I total the costs of 1 particular

salesperson? In psuedo-code like:

If COLUMN B, ROW1 = "Tim" then Add COLUMN A, ROW1 to the

total square at the
bottom for salesperson1...

Does anyone know how to do this?

Thanks!!!
.



hi
assuming that costs is column a2:A100 and salepersons is
column b2:b100:

=sumif(b2:b100,"salesperson1",A2:A100)

-----Original Message-----
I have 2 columns, one is "cost" which is in currency

form, and the other is
"salesperson".....(there are only 2 salespeople)

At the bottom of my sheet I have 3 squares, one for

saleperson1,
saleperson2, and grand total....

I know how to show the grand total by totaling the whole

column....

But how do I total the costs of 1 particular salesperson?

In psuedo-code like:

If COLUMN B, ROW1 = "Tim" then Add COLUMN A, ROW1 to the

total square at the
bottom for salesperson1...

Does anyone know how to do this?

Thanks!!!
.



All times are GMT +1. The time now is 04:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com