"Sumif" on multiple values

G

Guest

Hi all, I feel a little sheepish posting this question, but I really can't
get this to work:

I have a list of customer accounts in Sheet 1 column A, with sales turnover
in column C. Some of those accounts belong to the same group of companies. I
have the list of account numbers in, say Sheet 2 A1:A10.

How do I sum the sales turnover of the accounts in Sheet 1 that appear on
the list of account numbers in sheet 2? I've tried sumif and sum if as array
functions, but I can't quite find the right formula to use.

Thanks.
 
G

Guest

Hi Max,

Sorry if I wasn't clear, let me explain: my output needs to be something like:
Company Turnover (£000s)
Group X 120
Group Y 15
Company A 200

....where the 120 is a sum of all 10 accounts belonging to group X. The list
of accounts belonging to group X is the array 'Sheet 2'!A1:A10.

I hope that makes sense.

Thanks
 
G

Guest

In Sheet2

Put in B1:
=SUMPRODUCT(--ISNUMBER(MATCH(Sheet1!A2:A100,A1:A10,0)),Sheet1!C2:C100)
Adapt the Sheet1 ranges to suit your actual
 
G

Guest

Thank you, that's exactly what I was looking for. I've never used sumproduct
before, I'll have to look into it!
 
G

Guest

That "--" trick to turn a logical value into a number is also news to me, so
thank you for educating and informing me!
 

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

Similar Threads

I need to do a SUMIF AND 3
sumif on multiple sheets 1
Sumif where sum range is more than one column? 1
Sumif 1
sumif 1
Sumif - FastExcel 13
SUMIF 2
Sumif function 2

Top