ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sum using multiple criteria (https://www.excelbanter.com/excel-worksheet-functions/7441-sum-using-multiple-criteria.html)

Barbara 1

Sum using multiple criteria
 
What equation would I use to be able to sum a column based on multiple
criteria from another column? i.e..... sum if AG or AG

AG 50.00 Total
AD 25.00 75.00
DE 10.00
SG 45.00

JE McGimpsey

One way:

=SUMPRODUCT((A1:A4="AG")+(A1:A4="AD"),B1:B4)

In article ,
Barbara 1 <Barbara wrote:

What equation would I use to be able to sum a column based on multiple
criteria from another column? i.e..... sum if AG or AG

AG 50.00 Total
AD 25.00 75.00
DE 10.00
SG 45.00


Peo Sjoblom

See answer to your previous post, try to stay in the same thread

Regards,

Peo Sjoblom

"Barbara 1" wrote:

What equation would I use to be able to sum a column based on multiple
criteria from another column? i.e..... sum if AG or AG

AG 50.00 Total
AD 25.00 75.00
DE 10.00
SG 45.00


Frank Kabel

Hi
try
=SUMPRODUCT(--(A1:A100={"AG","AD"}),B1:B100)

Also see:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

--
Regards
Frank Kabel
Frankfurt, Germany

"Barbara 1" <Barbara schrieb im
Newsbeitrag ...
What equation would I use to be able to sum a column based on

multiple
criteria from another column? i.e..... sum if AG or AG

AG 50.00 Total
AD 25.00 75.00
DE 10.00
SG 45.00



Frank Kabel

Hi
should be:
=SUMPRODUCT((A1:A100={"AG","AD"})*(B1:B100))

--
Regards
Frank Kabel
Frankfurt, Germany

"Frank Kabel" schrieb im Newsbeitrag
...
Hi
try
=SUMPRODUCT(--(A1:A100={"AG","AD"}),B1:B100)

Also see:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

--
Regards
Frank Kabel
Frankfurt, Germany

"Barbara 1" <Barbara schrieb im
Newsbeitrag

...
What equation would I use to be able to sum a column based on

multiple
criteria from another column? i.e..... sum if AG or AG

AG 50.00 Total
AD 25.00 75.00
DE 10.00
SG 45.00





All times are GMT +1. The time now is 04:44 PM.

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