ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sumif question (https://www.excelbanter.com/excel-discussion-misc-queries/113128-sumif-question.html)

David Bradford

Sumif question
 
Hi

I would like to perform a sumif based on 2 columns being the same.

I am able to run the basic SUMIF(A:A,A1.B:B) but I was wondering if it is
possible to do this based on 2 columns being the same. e.g I want to sum
column c if column a and b are the same.

Any help will be greatly appreciated.

Stefi

Sumif question
 
=SUMPRODUCT(--(A2:A9=B2:B9),C2:C9)
Adjust ranges!

Regards,
Stefi


€žDavid Bradford€ť ezt Ă*rta:

Hi

I would like to perform a sumif based on 2 columns being the same.

I am able to run the basic SUMIF(A:A,A1.B:B) but I was wondering if it is
possible to do this based on 2 columns being the same. e.g I want to sum
column c if column a and b are the same.

Any help will be greatly appreciated.


JE McGimpsey

Sumif question
 
One way:

=SUMPRODUCT(--(A1:A1000=B1:B1000),C1:C1000)

In article ,
David Bradford <David wrote:

Hi

I would like to perform a sumif based on 2 columns being the same.

I am able to run the basic SUMIF(A:A,A1.B:B) but I was wondering if it is
possible to do this based on 2 columns being the same. e.g I want to sum
column c if column a and b are the same.

Any help will be greatly appreciated.


David Bradford

Sumif question
 
Sorry, I don't think I was clear. Column A and B won't be the same (as in
the same values)

Column A will specify one criteria (it is actually a code referring to a
fund) and column B will refer to another criteria (and asset within the
fund). I would like to be able to sum all like assets for each fund.

I toyed with if(sumif) but I don't know how this function works...

"Stefi" wrote:

=SUMPRODUCT(--(A2:A9=B2:B9),C2:C9)
Adjust ranges!

Regards,
Stefi


€žDavid Bradford€ť ezt Ă*rta:

Hi

I would like to perform a sumif based on 2 columns being the same.

I am able to run the basic SUMIF(A:A,A1.B:B) but I was wondering if it is
possible to do this based on 2 columns being the same. e.g I want to sum
column c if column a and b are the same.

Any help will be greatly appreciated.


Dave Peterson

Sumif question
 
To sum the values in column C when column A matches one criteria and column B
matches another criteria:

=sumproduct(--(a1:a100="criteria1"),--(b1:b100="criteria2"),(c1:c100))

To count the number of items (rows) where column A matches one criteria and
column B matches another criteria:

=sumproduct(--(a1:a100="criteria1"),--(b1:b100="criteria2"))

Adjust the ranges to match--but you can't use whole columns.

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

David Bradford wrote:

Sorry, I don't think I was clear. Column A and B won't be the same (as in
the same values)

Column A will specify one criteria (it is actually a code referring to a
fund) and column B will refer to another criteria (and asset within the
fund). I would like to be able to sum all like assets for each fund.

I toyed with if(sumif) but I don't know how this function works...

"Stefi" wrote:

=SUMPRODUCT(--(A2:A9=B2:B9),C2:C9)
Adjust ranges!

Regards,
Stefi


€žDavid Bradford€ť ezt Ă*rta:

Hi

I would like to perform a sumif based on 2 columns being the same.

I am able to run the basic SUMIF(A:A,A1.B:B) but I was wondering if it is
possible to do this based on 2 columns being the same. e.g I want to sum
column c if column a and b are the same.

Any help will be greatly appreciated.


--

Dave Peterson

JE McGimpsey

Sumif question
 
In that case, I'd strongly recommend using a Pivot Table...

http://peltiertech.com/Excel/Pivots/pivotstart.htm

In article ,
David Bradford wrote:

I would like to be able to sum all like assets for each fund.



All times are GMT +1. The time now is 12:33 AM.

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