Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Sumproduct excluding multiple criteria

Hi,
I'm trying to use the SUMPRODUCT formula to add up a colunm but exlude
certain values based on a criteria in another column. I have column A which
has the criteria and colunm H which has the value. I want to add up all of
colunm H but exclude certain values which meet a specific criteria. For
example, add up column H except for the values under column A that is equal
to the criteria 3420 and 4474:

A H
1 3410 $100
2 3420 $200
3 4474 $300
4 5425 $400


Thanks,


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Sumproduct excluding multiple criteria

Try this:

C1 = 3420
C2 = 4474

=SUMPRODUCT(--(ISNA(MATCH(A1:A4,C1:C2,0))),H1:H4)

Or, with the variables hardcoded in the formula:

=SUMPRODUCT(--(ISNA(MATCH(A1:A4,{3420;4474},0))),H1:H4)

--
Biff
Microsoft Excel MVP


"Ivano" wrote in message
...
Hi,
I'm trying to use the SUMPRODUCT formula to add up a colunm but exlude
certain values based on a criteria in another column. I have column A
which
has the criteria and colunm H which has the value. I want to add up all
of
colunm H but exclude certain values which meet a specific criteria. For
example, add up column H except for the values under column A that is
equal
to the criteria 3420 and 4474:

A H
1 3410 $100
2 3420 $200
3 4474 $300
4 5425 $400


Thanks,




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,104
Default Sumproduct excluding multiple criteria

either
=SUMPRODUCT(--(A1:A4<3420),--(A1:A4<4474),B1:B4)
or
=SUM(B1:B4)-(SUMIF(A1:A4,3420,B1:B4)+SUMIF(A1:A4,4474,B1:B4))

Adjust ranges as needed. Note that only Excel 2007 permits full column
references with SUMPRODUCT
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Ivano" wrote in message
...
Hi,
I'm trying to use the SUMPRODUCT formula to add up a colunm but exlude
certain values based on a criteria in another column. I have column A
which
has the criteria and colunm H which has the value. I want to add up all
of
colunm H but exclude certain values which meet a specific criteria. For
example, add up column H except for the values under column A that is
equal
to the criteria 3420 and 4474:

A H
1 3410 $100
2 3420 $200
3 4474 $300
4 5425 $400


Thanks,




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Sumproduct excluding multiple criteria

=SUM(B1:B4)-(SUMIF(A1:A4,3420,B1:B4)+SUMIF(A1:A4,4474,B1:B4))

simplify version:

=SUM(B11:B4,-SUMIF(A1:A4,{3420,4474},B1:B4))



"Bernard Liengme" wrote:

either
=SUMPRODUCT(--(A1:A4<3420),--(A1:A4<4474),B1:B4)
or
=SUM(B1:B4)-(SUMIF(A1:A4,3420,B1:B4)+SUMIF(A1:A4,4474,B1:B4))

Adjust ranges as needed. Note that only Excel 2007 permits full column
references with SUMPRODUCT
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Ivano" wrote in message
...
Hi,
I'm trying to use the SUMPRODUCT formula to add up a colunm but exlude
certain values based on a criteria in another column. I have column A
which
has the criteria and colunm H which has the value. I want to add up all
of
colunm H but exclude certain values which meet a specific criteria. For
example, add up column H except for the values under column A that is
equal
to the criteria 3420 and 4474:

A H
1 3410 $100
2 3420 $200
3 4474 $300
4 5425 $400


Thanks,





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,104
Default Sumproduct excluding multiple criteria

I always forget that { } stuff !!!
Thanks

But I prefer the logic of =SUM(B11:B4) - SUMIF(A1:A4,{3420,4474},B1:B4)

cheers
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Teethless mama" wrote in message
...
=SUM(B1:B4)-(SUMIF(A1:A4,3420,B1:B4)+SUMIF(A1:A4,4474,B1:B4))


simplify version:

=SUM(B11:B4,-SUMIF(A1:A4,{3420,4474},B1:B4))



"Bernard Liengme" wrote:

either
=SUMPRODUCT(--(A1:A4<3420),--(A1:A4<4474),B1:B4)
or
=SUM(B1:B4)-(SUMIF(A1:A4,3420,B1:B4)+SUMIF(A1:A4,4474,B1:B4))

Adjust ranges as needed. Note that only Excel 2007 permits full column
references with SUMPRODUCT
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Ivano" wrote in message
...
Hi,
I'm trying to use the SUMPRODUCT formula to add up a colunm but exlude
certain values based on a criteria in another column. I have column A
which
has the criteria and colunm H which has the value. I want to add up
all
of
colunm H but exclude certain values which meet a specific criteria.
For
example, add up column H except for the values under column A that is
equal
to the criteria 3420 and 4474:

A H
1 3410 $100
2 3420 $200
3 4474 $300
4 5425 $400


Thanks,









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple criteria for sumproduct ocuhcs Excel Discussion (Misc queries) 4 April 26th 09 02:44 AM
Using Min Formula with Multiple Criteria Excluding Zeros LucyB4God Excel Worksheet Functions 5 November 25th 08 12:20 AM
SUMPRODUCT / SUMIF on Multiple Worksheets with Multiple Criteria kazoo Excel Discussion (Misc queries) 2 August 21st 08 06:22 PM
SUMPRODUCT excluding multiple conditions tmwilkin Excel Worksheet Functions 3 May 1st 08 03:47 PM
Using Sumproduct with multiple Criteria Mark Jackson Excel Worksheet Functions 1 May 6th 05 10:07 PM


All times are GMT +1. The time now is 02:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"