View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default SUMPRODUCT Formula

.. a formula that will sumproduct Shampoo 200mL Customer Y
+ 2in1 400mL Customer Y ..


Assuming your data as posted in cols A to D
where in B1 across are the customers: Customer X, etc
in A2 down are the products: Shampoo 200mL, etc
then this expression will calculate what you seek:
=SUMPRODUCT(--ISNUMBER(MATCH(A2:A10,{"Shampoo 200mL";"2in1
400mL"},0)),OFFSET(A2:A10,,MATCH("Customer Y",B1:D1,0)))
Adapt the ranges to suit

Celebrate? Click YES below

P/s: Pl post new queries as new threads in future
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,500 Files:370 Subscribers:66
xdemechanik
---
"Vanessa Simmonds" wrote:
Hi Max,

Thank you very much for your help.

I have just one more quick question:

How can i use sumproduct, and and or formulas together?

I want my sumproduct formula to sum the product of five different variable.
See example below:

Customer X Customer
Y Customer z
Shampoo 200mL 10 40
70
Conditioner 250mL 20 50
80
2in1 400mL 30 60
90

So I want a formula that will sumproduct Shampoo 200mL Customer Y + 2in1
400mL Customer Y.

I tried to use Sumproduct(and( but it didn't work.

Thank you very much for your attention.