# SumIF multiple column criteria

1. ## SumIF multiple column criteria

Hi, looking to work a sum function with multiple match criteria. I.e., if column A = x and Column B = y, then sum Column C

2. Maybe

=SUMPRODUCT((A1:A10="X")*(B1:B10="Y")*(C1:C10))
VBA Noob

3. Hi, no sorry, not looking for a sumproduct. Here is what I have...

=SUMIF((AND(A1:A10="X",B1:B10="Y"),C1:C10)

where I'm looking to sum Column C for all rows that match the dual column criteria of A and B

4. Originally Posted by gd19
Hi, no sorry, not looking for a sumproduct. Here is what I have...

=SUMIF((AND(A1:A10="X",B1:B10="Y"),C1:C10)

where I'm looking to sum Column C for all rows that match the dual column criteria of A and B
Unless I'm completely misunderstanding your requirement, that's precisely what VBA Noob's SUMPRODUCT() function gives you.

Why do you think it doesn't? This is the standard way of achieving a multi criteria 'SUMIF', which is something Microsoft in their infinite wisdom didn't cater for. Although it has to be said that SUMPRODUCT() is a pretty powerful general purpose solution for most of these sorts of requests. If you read around the subject you'll find that people have developed it in extremely clever ways that I guess Microsoft never even envisaged.

HTH

5. Homework ??

Try this array (Ctrl + Shift + enter)

=SUM(IF(A1:A10="X",IF(B1:B10="y",C1:C10)))
VBA Noob

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1