Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default is there anyway to use sumif using 2 criteria

I am trying to sum the values in a column based on data in two other columns
of the same row meeting specific criteria.

I have data in A2:A10, C2:C10 and E2:E10 and I only want to sum the values
in A2:A10 if spedified, different criteria is met in BOTH C2:C10 and E2:E10.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default is there anyway to use sumif using 2 criteria

Use SUMPRODUCT

=SUMPRODUCT--(C2:C10=condition1),--(E2:E10=condition2),A2:A10)

HTH

"Steve 51" wrote:

I am trying to sum the values in a column based on data in two other columns
of the same row meeting specific criteria.

I have data in A2:A10, C2:C10 and E2:E10 and I only want to sum the values
in A2:A10 if spedified, different criteria is met in BOTH C2:C10 and E2:E10.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default is there anyway to use sumif using 2 criteria

This appears to work. However, I do not understand why it is necessary to put
-- before the conditions.

"Toppers" wrote:

Use SUMPRODUCT

=SUMPRODUCT--(C2:C10=condition1),--(E2:E10=condition2),A2:A10)

HTH

"Steve 51" wrote:

I am trying to sum the values in a column based on data in two other columns
of the same row meeting specific criteria.

I have data in A2:A10, C2:C10 and E2:E10 and I only want to sum the values
in A2:A10 if spedified, different criteria is met in BOTH C2:C10 and E2:E10.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default is there anyway to use sumif using 2 criteria

this (--) converts True/False conditions to 1/0 so you can do calculations.
If, using your example, you have C1=True, E1=True and A1=20 then SUMPRODUCT
calculates 1*1*20 =20. If C1 was False then 0*1*20=0

Look here for a full explanation of SUMPRODUCT:


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

HTH


"Steve 51" wrote:

This appears to work. However, I do not understand why it is necessary to put
-- before the conditions.

"Toppers" wrote:

Use SUMPRODUCT

=SUMPRODUCT--(C2:C10=condition1),--(E2:E10=condition2),A2:A10)

HTH

"Steve 51" wrote:

I am trying to sum the values in a column based on data in two other columns
of the same row meeting specific criteria.

I have data in A2:A10, C2:C10 and E2:E10 and I only want to sum the values
in A2:A10 if spedified, different criteria is met in BOTH C2:C10 and E2:E10.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default is there anyway to use sumif using 2 criteria

Thanks a lot. The formula worked and your explanation was very helpful in
understanding how the functions works.

"Toppers" wrote:

this (--) converts True/False conditions to 1/0 so you can do calculations.
If, using your example, you have C1=True, E1=True and A1=20 then SUMPRODUCT
calculates 1*1*20 =20. If C1 was False then 0*1*20=0

Look here for a full explanation of SUMPRODUCT:


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

HTH


"Steve 51" wrote:

This appears to work. However, I do not understand why it is necessary to put
-- before the conditions.

"Toppers" wrote:

Use SUMPRODUCT

=SUMPRODUCT--(C2:C10=condition1),--(E2:E10=condition2),A2:A10)

HTH

"Steve 51" wrote:

I am trying to sum the values in a column based on data in two other columns
of the same row meeting specific criteria.

I have data in A2:A10, C2:C10 and E2:E10 and I only want to sum the values
in A2:A10 if spedified, different criteria is met in BOTH C2:C10 and E2:E10.

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
How do I use the sumif if I have multiple criteria (i.e. greater . Kellyatisl Excel Worksheet Functions 3 June 4th 06 06:33 AM
Multiple SUMIF Criteria azazel Excel Worksheet Functions 3 November 10th 05 08:31 PM
SUMIF with Mutiple Ranges & Criteria PokerZan Excel Discussion (Misc queries) 5 August 4th 05 10:31 PM
"criteria" in a sumif refering to the value in another cell mark Excel Discussion (Misc queries) 1 January 31st 05 07:39 PM
Can I use a cell reference in the criteria for the sumif function. Number Cruncher Excel Worksheet Functions 2 November 4th 04 07:52 PM


All times are GMT +1. The time now is 10:38 PM.

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

About Us

"It's about Microsoft Excel"