I want to do a sumif() command if cell a=x AND b=y.
P Paul Corrado Aug 26, 2003 #2 Dan, =SUMPRODUCT((A1:A10="x")*(B1:B10="y")*(C1:C10)) Change the range references and criteria as needed. PC
Dan, =SUMPRODUCT((A1:A10="x")*(B1:B10="y")*(C1:C10)) Change the range references and criteria as needed. PC
M Mark Tymes Aug 26, 2003 #3 Paul Corrado wrote =SUMPRODUCT((A1:A10="x")*(B1:B10="y")*(C1:C10)) Click to expand... Change the range references and criteria as needed. Click to expand... Very good solution. One little problem I have found with this in the past. Suppose B1:B10 contains text like as illustrated below. boat club banana boat fishing boat sailing boat What we want to do is sum the cells containing "boat" using the same formula. B1:B10="boat" or even B1:B10="*boat*" did not work for me. Mark
Paul Corrado wrote =SUMPRODUCT((A1:A10="x")*(B1:B10="y")*(C1:C10)) Click to expand... Change the range references and criteria as needed. Click to expand... Very good solution. One little problem I have found with this in the past. Suppose B1:B10 contains text like as illustrated below. boat club banana boat fishing boat sailing boat What we want to do is sum the cells containing "boat" using the same formula. B1:B10="boat" or even B1:B10="*boat*" did not work for me. Mark
J jr Aug 26, 2003 #4 yes, the function description mentions this explicitly. Wildcards cannot be used here.
A Alan Beban Aug 26, 2003 #5 But they can here: =SUMPRODUCT((A$1:A$5="x")*(SEARCH("*boat",B1:B5)*(C1:C5))) Alan Beban
A Alan Beban Aug 27, 2003 #6 What's in I9 and K9? Alan Beban Try this, must be entered as an array... {=SUM(IF((I13:I21=I9)*(K13:K21=K9),M13:M21,0))} adjust range... Click to expand...
What's in I9 and K9? Alan Beban Try this, must be entered as an array... {=SUM(IF((I13:I21=I9)*(K13:K21=K9),M13:M21,0))} adjust range... Click to expand...
M Mark Tymes Aug 27, 2003 #7 jr wrote yes, the function description mentions this explicitly. Wildcards cannot be used here. Click to expand... I was unaware of this but I do believe it must be true. Thank you. Mark
jr wrote yes, the function description mentions this explicitly. Wildcards cannot be used here. Click to expand... I was unaware of this but I do believe it must be true. Thank you. Mark
A Alan Beban Aug 27, 2003 #8 I posted the following in this thread yesterday: =SUMPRODUCT((A$1:A$5="x")*(SEARCH("*boat",B1:B5)*(C1:C5))) Alan Beban
I posted the following in this thread yesterday: =SUMPRODUCT((A$1:A$5="x")*(SEARCH("*boat",B1:B5)*(C1:C5))) Alan Beban