Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
La Donna
 
Posts: n/a
Default Sum if statements with conditions

I want to sum a part code if a different cell reference is I for example:
I J P Q (headings)
33114606 current 30
33114606 current 30
33114606 August 40
33114606 QOH 40

I want the return value to be 40 for if I
Then another formula that returns 60 for P where current
Then another formula that returns 40 for P where August
I have multible part codes in the list I want to do this to.
  #2   Report Post  
Domenic
 
Posts: n/a
Default

I'm not sure I understand fully, but try the following...

Assumptions:

A1:F5 contains your table

C1:F1 contains your headers/labels I, J, P, and Q

Formula:

=SUMPRODUCT(--(A2:A5=33114606),--(B2:B5="current"),INDEX(C2:F5,0,MATCH("P
",C1:F1,0)))

OR

=SUMPRODUCT(--(A2:A5=H2),--(B2:B5=I2),INDEX(C2:F5,0,MATCH(J2,C1:F1,0)))

....where H2 contains your 'Part Code', I2 contains your status, such as
'Current', and J2 contains your column of interest, designated by a
heading such as 'P'. Adjust the range accordingly.

Hope this helps!


In article ,
"La Donna" <La wrote:

I want to sum a part code if a different cell reference is I for example:
I J P Q (headings)
33114606 current 30
33114606 current 30
33114606 August 40
33114606 QOH 40

I want the return value to be 40 for if I
Then another formula that returns 60 for P where current
Then another formula that returns 40 for P where August
I have multible part codes in the list I want to do this to.

  #3   Report Post  
La Donna
 
Posts: n/a
Default

Thank you. It worked perfect. I had never used SUMPRODUCT.

"Domenic" wrote:

I'm not sure I understand fully, but try the following...

Assumptions:

A1:F5 contains your table

C1:F1 contains your headers/labels I, J, P, and Q

Formula:

=SUMPRODUCT(--(A2:A5=33114606),--(B2:B5="current"),INDEX(C2:F5,0,MATCH("P
",C1:F1,0)))

OR

=SUMPRODUCT(--(A2:A5=H2),--(B2:B5=I2),INDEX(C2:F5,0,MATCH(J2,C1:F1,0)))

....where H2 contains your 'Part Code', I2 contains your status, such as
'Current', and J2 contains your column of interest, designated by a
heading such as 'P'. Adjust the range accordingly.

Hope this helps!


In article ,
"La Donna" <La wrote:

I want to sum a part code if a different cell reference is I for example:
I J P Q (headings)
33114606 current 30
33114606 current 30
33114606 August 40
33114606 QOH 40

I want the return value to be 40 for if I
Then another formula that returns 60 for P where current
Then another formula that returns 40 for P where August
I have multible part codes in the list I want to do this to.


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
Counting occurrences of multiple conditions Jvanderv1 Excel Discussion (Misc queries) 2 April 6th 05 01:07 AM
Nested IF statements John Simons Excel Worksheet Functions 14 February 16th 05 06:17 AM
should be possible to add more conditions to conditional formatti. excel_jan Excel Discussion (Misc queries) 3 February 9th 05 06:41 PM
How to multiple conditions to validate more than 2 conditions to . Bhuvana Govind Excel Worksheet Functions 1 January 28th 05 07:07 PM
average on 2 conditions Ted Metro Excel Worksheet Functions 6 January 7th 05 08:23 PM


All times are GMT +1. The time now is 03:07 AM.

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"