Conditional Sumproduct

From: Marcotte A (MarcotteA_at_discussions.microsoft.com)
Date: 06/16/04


Date: Wed, 16 Jun 2004 15:52:01 -0700

I have 30 product lines across the top of my SS. Each product has 6 columns (Produced, Spoils, Sales etc.). Each product falls into one of two catagories (designated F and E), which is in row 1, in the first column of the 6 for that product (e.g. H1, N1 etc.). Row 2 holds the product price (in the 5th column of the product - eg. L2, R2 etc.)

The second column holds the spoils - dates run down the left so I have spoils in I5,I6,I7 etc and O5,O6,O7 etc.)

What I want to do is calculate the price of the spoils for the F type products and E type products separately, without having to individually select the appropriate cells. Also, the products may change, or new ones added (currently have 20 with space for 10 more).

Is there a way to do this with just built in functions? I have already written a UDF for another calculation in this workbook, so I can do that here, but I would rather use the built in functions in I can.