Sumproduct with 2 criteria

G

Guest

Based on the following data I would like a formula in Column D that will
return a value based on data in columns a, b and c.
a b c
D
1 WC0256 ITT OPEN $500.00 Internal
2 14A555 SOLD $100.00 $100
3 WE0516 ITT PARTIAL $200.00 Internal

The Column D values are the correct value. I tried this formula but I'm not
sure what's wrong with it.

SUMPRODUCT(--( ISERR(SEARCH("ITT",b1)),--(
ISerror(LEFT(a1)+0)),(c1)),"Internal"

THANK YOU
 
G

Guest

Further clarification, If the cells in column A begin with a letter and cells
in B contain the term "ITT", Column D should read INTERNAL. If either/or the
criteria for A and B are not true, Column D should read the value of column C.

Sorry so confusing and THANK YOU for assistance.
 
B

Bernard Liengme

Sorry to be blunt, but you have totally misunderstood the use of SUMPRODUCT.
See http://www.xldynamic.com/source/xld.SUMPRODUCT.html

What you need is IF. Try this
=IF(AND(CODE(UPPER(LEFT(A1,1)))>=65,CODE(UPPER(LEFT(A1,1)))<=90,LEFT(B1,3)="ITT"),"Internal",C1)

To test more than one condition in IF we use the AND function.
=IF(AND(test1, test2, ....), true_reply, false_reply)
best wishes
 
G

Guest

LOL!! Be as blunt as you want! the Sumproduct was a desperate attempt to
blindly find my answer, but it failed miserably. Yours, however, worked
marvelously!
THANK YOU
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top