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
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
Last edited by VBA Noob; 03-05-2008 at 05:09 PM.
Maybe
VBA Noob=SUMPRODUCT((A1:A10="X")*(B1:B10="Y")*(C1:C10))
_________________________________________
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
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.Originally Posted by gd19
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
Homework ??
Try this array (Ctrl + Shift + enter)
VBA Noob=SUM(IF(A1:A10="X",IF(B1:B10="y",C1:C10)))
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks