Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Horizontal Array Conditional Sum Product

Status
Not open for further replies.

jcox

Structural
Joined
Jul 16, 2002
Messages
37
Location
US
I am having trouble with the following formula. I am trying to add a series of numbers based on the following criteria:
Row 7 must be a blank number
Row 6 must contain certain "triggers"
if these two conditions are met then sum the related cells in Row 9.

=SUMPRODUCT(ISBLANK(J7:Z7)*(J9:Z9)*OR(J6:Z6={"Text1";"Text2";"Text3";"Text4"}))

I have used something similar before, but only in vertical arrays. The first test seems to be fine, the error is happening somehow in the 2nd test. I can make the test array work fine by itself, but I can't seem to make it work as part of the formula. In the sumproduct formula the second condition seems to be always "True" regardless of what is in Row 6. I would love to redo the spreadsheet, but since I'm trying to help someone out, I doubt that is a possibility. Basically, someone has invented an elaborate spreadsheet and now needs a method of managing it.

Thanks
 
Found works as follows if remove OR and add brackets:
=SUMPRODUCT(ISBLANK(J7:z7)*(J8:z8)*((J9:z9)={"text1";"text2";"text3";"text4"}))

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top