Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
GateKeeper
 
Posts: n/a
Default Sum column if multiple criteria are met in adjacent cells

I have a table like this:

Column_A Column_B Column_C
03 S 100
03 T 100
02 S 100
02 T 100
04 S 100
04 T 100

I want to sum the cells in C only when A="03" and B="S". In this case, I
would expect the total to be 100.
  #2   Report Post  
David Billigmeier
 
Posts: n/a
Default

Assume your values are in the range A1:A10, B1:B10 and C1:C10:

=SUMPRODUCT(--(A1:A10="03"),--(B1:B10="S"),C1:C10)
--
Regards,
Dave


"GateKeeper" wrote:

I have a table like this:

Column_A Column_B Column_C
03 S 100
03 T 100
02 S 100
02 T 100
04 S 100
04 T 100

I want to sum the cells in C only when A="03" and B="S". In this case, I
would expect the total to be 100.

  #3   Report Post  
GateKeeper
 
Posts: n/a
Default

Perfect. What is the purpose of the "--"?
--
GateKeeper
Experienced Computer User


"David Billigmeier" wrote:

Assume your values are in the range A1:A10, B1:B10 and C1:C10:

=SUMPRODUCT(--(A1:A10="03"),--(B1:B10="S"),C1:C10)
--
Regards,
Dave


"GateKeeper" wrote:

I have a table like this:

Column_A Column_B Column_C
03 S 100
03 T 100
02 S 100
02 T 100
04 S 100
04 T 100

I want to sum the cells in C only when A="03" and B="S". In this case, I
would expect the total to be 100.

  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

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

--

HTH

RP
(remove nothere from the email address if mailing direct)


"GateKeeper" wrote in message
...
Perfect. What is the purpose of the "--"?
--
GateKeeper
Experienced Computer User


"David Billigmeier" wrote:

Assume your values are in the range A1:A10, B1:B10 and C1:C10:

=SUMPRODUCT(--(A1:A10="03"),--(B1:B10="S"),C1:C10)
--
Regards,
Dave


"GateKeeper" wrote:

I have a table like this:

Column_A Column_B Column_C
03 S 100
03 T 100
02 S 100
02 T 100
04 S 100
04 T 100

I want to sum the cells in C only when A="03" and B="S". In this

case, I
would expect the total to be 100.



  #5   Report Post  
RagDyer
 
Posts: n/a
Default

This would work just as well:

=SUMPRODUCT((A1:A10="03")*(B1:B10="S")*C1:C10)

But to explain the unary, check these out:

http://www.mcgimpsey.com/excel/formulae/doubleneg.html

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

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"GateKeeper" wrote in message
...
Perfect. What is the purpose of the "--"?
--
GateKeeper
Experienced Computer User


"David Billigmeier" wrote:

Assume your values are in the range A1:A10, B1:B10 and C1:C10:

=SUMPRODUCT(--(A1:A10="03"),--(B1:B10="S"),C1:C10)
--
Regards,
Dave


"GateKeeper" wrote:

I have a table like this:

Column_A Column_B Column_C
03 S 100
03 T 100
02 S 100
02 T 100
04 S 100
04 T 100

I want to sum the cells in C only when A="03" and B="S". In this

case, I
would expect the total to be 100.




  #6   Report Post  
Ashish Mathur
 
Posts: n/a
Default

Hi,

Try this with array formulas (Ctrl+Shift+Enter):

SUM(IF((A5:A7="03")*(B5:B7="A"),C5:C7))

Regards,

Ashish Mathur



"GateKeeper" wrote:

I have a table like this:

Column_A Column_B Column_C
03 S 100
03 T 100
02 S 100
02 T 100
04 S 100
04 T 100

I want to sum the cells in C only when A="03" and B="S". In this case, I
would expect the total to be 100.

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
Formula to lookup Multiple Column Text and then Count Result ShelbyMan Excel Worksheet Functions 2 August 22nd 05 01:43 AM
Lookup Table Dilemma Karen Excel Worksheet Functions 2 June 10th 05 08:22 PM
Sumproduct with a vLookup, multiple criteria Tom F Excel Worksheet Functions 3 May 6th 05 04:28 PM
sumproduct using multiple criteria tifosi3 Excel Worksheet Functions 2 January 6th 05 08:46 PM
Sumproduct - multiple criteria in Column A briank Excel Worksheet Functions 2 January 6th 05 06:44 PM


All times are GMT +1. The time now is 01:56 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"