=SUMPRODUCT((A1:A100="XXXX")*(B1:B100={Y,Z}),(C1:C100))
Adjust the ranges to suit your data, but you can't use full-column
references if you are using Excel 2003 or earlier.
No need to model column B NOT being e, f, or g - these are excluded
anyway if B is Y or Z.
Hope this helps.
Pete
On Feb 4, 12:28Â am, JenniferCHW
=SUMPRODUCT(--(A1:A10="xxxx"),--(ISNUMBER(MATCH(B1:B10,{"y";"z"},0))),C1:C10)
Better to use cells to hold the criteria:
E1 = xxxx
F1 = y
G1 = z
=SUMPRODUCT(--(A1:A10=E1),--(ISNUMBER(MATCH(B1:B10,F1:G1,0))),C1:C10)
--
Biff
Microsoft Excel MVP
"JenniferCHW" <Jenni...@discussions.microsoft.com> wrote in message
news:0C8E8119-08DF-44FF...@microsoft.com...
Col A Col B Col C
Apple West 5
Orange South 7
Orange East 9
Orange West 4
I am looking for oranges in the west or east only. The answer is 13.
=SUMPRODUCT(--(A1:A4=E1),--(ISNUMBER(MATCH(B1:B4,F1:G1,0))),C1:C4)
Result = 13
--
Biff
Microsoft Excel MVP
"JenniferCHW" <Jenni...@discussions.microsoft.com> wrote in message
news:083EA36D-1260-467B...@microsoft.com...
=SUMPRODUCT(--(A1:A100="Orange"), (B1:B100="East")+(B1:B100="West"),
C1:C100)
In article <083EA36D-1260-467B...@microsoft.com>,
"T. Valko" <biffi...@comcast.net> wrote in message
news:%23RADhmm...@TK2MSFTNGP04.phx.gbl...
(A1:A4=E1)
(ISNUMBER(MATCH(B1:B4,F1:G1,0)))
The double unary minus "--" coerces those logical values to 1 for TRUE and 0
for FALSE.
Then all 3 arrays are multiplied together:
0*1*5=0
1*0*7=0
1*1*9=9
1*1*4=4
Then summed for the final result:
=SUMPRODUCT({0;0;9;4}) = 13
For more info see:
http://xldynamic.com/source/xld.SUMPRODUCT.html
http://mcgimpsey.com/excel/formulae/doubleneg.html
--
Biff
Microsoft Excel MVP
"hooroy63" <hoor...@gmail.com> wrote in message
news:uOhZscnh...@TK2MSFTNGP04.phx.gbl...
"T. Valko" <biffi...@comcast.net> wrote in message
news:u93KPxnh...@TK2MSFTNGP04.phx.gbl...
Col B = name (text field)
Col C = Last name (text field)
Col D = Expences (number)
I would like to SUM to A1 total expences of a person answering True on Col B
& Col C
Name will apear more then once on A & B
Thanks a milion
=SUMPRODUCT(--(B1:B10="John"),--(C1:C10="Smith"),D1:D10)
Better to use cells to hold the criteria:
A2 = some first name = John
A3 = some last name = Smith
=SUMPRODUCT(--(B1:B10=A2),--(C1:C10=A3),D1:D10)
--
Biff
Microsoft Excel MVP
"-yuval" <-yu...@discussions.microsoft.com> wrote in message
news:1D984CA0-B0BC-498C...@microsoft.com...
F1 = West
G1 = East
--
Biff
Microsoft Excel MVP
"JenniferCHW" <Jenni...@discussions.microsoft.com> wrote in message
news:C44536C3-F61E-49F5...@microsoft.com...