Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I want to draw out information from a table of fields if two conditions are
true. SumIF doesn't seem to handle it, but I may be using it incorrectly. A1=products, B1=price, C1=quantity sold, D1=quarter sold in A2=carrots, $1.00, 20, 4 A3=beets, $2.00, 10, 4 A4=carrots, $1.00, 15, 3 A5=carrots, $1.00, 10, 4 So what I'm trying to get out of this is a sum of the Quantity of carrots sold during each quarter. To me that's the Sum of quantities, If quarter = 1 and product = carrots - but I'm not sure how to build it... Thoughts? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Easier way, use SUMPRODUCT.
=SUMPRODUCT(--($A$2:$A$5=vegetable),--($D$2:$D$5=quarter),($C$2:$C$5)) where vegetable is a reference to cell that shows what vegetable you are searching for, and quarter is which quarter you are calculating. Obviously, expand the ranges beyond row 5 as far as needed. Ensure all ranges are the exact same length. -- ** John C ** Please remember, if your question is answered, to check the YES box below. It helps everyone. "Idolminder" wrote: I want to draw out information from a table of fields if two conditions are true. SumIF doesn't seem to handle it, but I may be using it incorrectly. A1=products, B1=price, C1=quantity sold, D1=quarter sold in A2=carrots, $1.00, 20, 4 A3=beets, $2.00, 10, 4 A4=carrots, $1.00, 15, 3 A5=carrots, $1.00, 10, 4 So what I'm trying to get out of this is a sum of the Quantity of carrots sold during each quarter. To me that's the Sum of quantities, If quarter = 1 and product = carrots - but I'm not sure how to build it... Thoughts? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=SUMPRODUCT((A2:A5="carrots")*(D2:D5=1)*(C2:C5)) if you want the quantity.
=SUMPRODUCT((A2:A5="carrots")*(D2:D5=1)*(C2:C5)*(B 2:B5)) if you wish to multiply by the price too. -- David Biddulph "Idolminder" wrote in message ... I want to draw out information from a table of fields if two conditions are true. SumIF doesn't seem to handle it, but I may be using it incorrectly. A1=products, B1=price, C1=quantity sold, D1=quarter sold in A2=carrots, $1.00, 20, 4 A3=beets, $2.00, 10, 4 A4=carrots, $1.00, 15, 3 A5=carrots, $1.00, 10, 4 So what I'm trying to get out of this is a sum of the Quantity of carrots sold during each quarter. To me that's the Sum of quantities, If quarter = 1 and product = carrots - but I'm not sure how to build it... Thoughts? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sumif for multi conditions. i.e sumif(A1:A10,"Jon" and B1:B10,"A" | Excel Worksheet Functions | |||
SUMIF, Is this the only way | Excel Discussion (Misc queries) | |||
Embedding a Sumif in a sumif | Excel Worksheet Functions | |||
nested sumif or sumif with two criteria | Excel Worksheet Functions | |||
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function | Excel Worksheet Functions |