ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   *** Urgent help formula * Need to sum values in a column if all .. (https://www.excelbanter.com/excel-worksheet-functions/166485-%2A%2A%2A-urgent-help-formula-%2A-need-sum-values-column-if-all.html)

Alpha Bravo Charlie

*** Urgent help formula * Need to sum values in a column if all ..
 
I need to add the values in column "C" If the values in Column "A" are the
same and the values Column "B" are the same. How can I do it ? In the example
below I want to sum the column "C" if A1=A2 and B1=B2. I have thousands of
rows so I want to do it in one shot. What should be the formula??? Please help

A B C
Engineer USA 1000
Engineer USA 100
Engineer USA 300
Doctor Canada 500
Doctor Canada 4000
Doctor China 300
Doctor China 100
Teacher France 200
Teacher Belgium 250

Bernard Liengme

*** Urgent help formula * Need to sum values in a column if all ..
 
This is an ideal problem for Pivot Table
See http://peltiertech.com/Excel/Pivots/pivotstart.htm
best wishes
--
Bernard Liengme
www.stfx.ca/people/bliengme
Microsoft Excel MVP
remove CAPS in email address


"Alpha Bravo Charlie" <Alpha Bravo wrote
in message ...
I need to add the values in column "C" If the values in Column "A" are the
same and the values Column "B" are the same. How can I do it ? In the
example
below I want to sum the column "C" if A1=A2 and B1=B2. I have thousands
of
rows so I want to do it in one shot. What should be the formula??? Please
help

A B C
Engineer USA 1000
Engineer USA 100
Engineer USA 300
Doctor Canada 500
Doctor Canada 4000
Doctor China 300
Doctor China 100
Teacher France 200
Teacher Belgium 250




bpeltzer

*** Urgent help formula * Need to sum values in a column if all ..
 
I *think* you're asking to add all the values in column C that are on rows
where the values in column A and B are the same. If so,
=SUMPRODUCT(--(A1:A4=B1:B4),C1:C4)
should do it (for 4 rows; you can change the 4 to the number of rows you've
got). Note that the comparison is case insensitive, so that if A and B are
teacher and TEACHER, the value in column C of that row would be included in
your sum.

"Alpha Bravo Charlie" wrote:

I need to add the values in column "C" If the values in Column "A" are the
same and the values Column "B" are the same. How can I do it ? In the example
below I want to sum the column "C" if A1=A2 and B1=B2. I have thousands of
rows so I want to do it in one shot. What should be the formula??? Please help

A B C
Engineer USA 1000
Engineer USA 100
Engineer USA 300
Doctor Canada 500
Doctor Canada 4000
Doctor China 300
Doctor China 100
Teacher France 200
Teacher Belgium 250



All times are GMT +1. The time now is 01:03 PM.

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