Sum if 2 variables

K

ksel

Hi, in 1 column I have the name of periods (1 year = 13 periods of 4 weeks:
Period 1, Period 2 etc) and in another column I have the name of customers
(cmr 1, cmr 2 etc).
A third column has the weight of product sold to that customer.
Now I would like to see how much weight was sold to every customer per period:
if you see "Period 1" in column 1, count weight if you see "cmr 1".

In the result, the customer's name is sorted vertically, the periods
horizontally... I tried with SUMIF, but then I have to change the ranges for
every period...

Thanks a lot for suggestions,

Kristoff
 
P

Per Jessen

Hi Kristoff

You need a SumProduct formula.

Suppose you have periods in A2:A100, Customers in B2:B100 and Weight sold in
C2:C100, the formula below will calculate the weight sold in period 1 to
customer 1.

=SUMPRODUCT(--(A2:A100="Period 1"),--(B2:B100="cmr 1"),C2:C100)

You can of course replace "Period 1" and "cmr 1" with a cell reference to
make the formula more flexible.

Hopes this helps.
 
J

Jacob Skaria

Try with SUMPRODUCT

=SUMPRODUCT(--(A1:A100="Period"),--(B1:B100="customer"),C1:C100)


If this post helps click Yes
 

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