View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Per Jessen Per Jessen is offline
external usenet poster
 
Posts: 1,533
Default Sum if 2 variables

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.

---
Per

"ksel" skrev i meddelelsen
...
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