SUMPRODUCT with multiple column criteria

mmunoz20

New Member
Joined
Aug 11, 2017
Messages
6
Hi,

I have this formula, but it is not working. Any advice is welcome!

=SUMPRODUCT((database!$B$2:$B$<wbr style="font-family: arial, sans-serif; font-size: 12.800000190734863px;">7=$B$1)*(database!$P$2:$P$7=<wbr style="font-family: arial, sans-serif; font-size: 12.800000190734863px;">"AA")*((database!$M$2:$M$7>=$B$<wbr style="font-family: arial, sans-serif; font-size: 12.800000190734863px;">2)*(database!$M$2:$M$7<=$C$2))<wbr style="font-family: arial, sans-serif; font-size: 12.800000190734863px;">*(database!$N$2:$N$7))

main concerns on the column $N$2:$N$7
"AA"
"BB"
so the formula would be finding the number of clients in a particular school (e.g., school A=$B$1) and a particular time period (>='Graphs - Per school per period'!$B$2 & <='Graphs - Per school per period'!$C$2) that listed under the main concern column (N:N) that it as "AA" reason
I am having trouble creating a formula that would encompass all that criteria. I attempted that above formula, but it did not give me that accurate count.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Which range must meet either "AA" or "BB"? The range database!$P$2:$P$7 or database!$N$2:$N$7?


Thank you!! Your question helped me figure out my mistake! This is the right formula:

=SUMPRODUCT((database!$B$2:$B$<wbr style="color: rgb(87, 65, 35); font-family: arial, sans-serif; font-size: 12.800000190734863px;">7=$B$1)*(database!$P$2:$P$7=<wbr style="color: rgb(87, 65, 35); font-family: arial, sans-serif; font-size: 12.800000190734863px;">"AA")*((database!$M$2:$M$7>=$B$<wbr style="color: rgb(87, 65, 35); font-family: arial, sans-serif; font-size: 12.800000190734863px;">2)*(database!$M$2:$M$7<=$C$2)))

Thanks so much!!!
 
Upvote 0
Thank you!! Your question helped me figure out my mistake! This is the right formula:

=SUMPRODUCT((database!$B$2:$B$<wbr style="color: rgb(87, 65, 35); font-family: arial, sans-serif; font-size: 12.800000190734863px;">7=$B$1)*(database!$P$2:$P$7=<wbr style="color: rgb(87, 65, 35); font-family: arial, sans-serif; font-size: 12.800000190734863px;">"AA")*((database!$M$2:$M$7>=$B$<wbr style="color: rgb(87, 65, 35); font-family: arial, sans-serif; font-size: 12.800000190734863px;">2)*(database!$M$2:$M$7<=$C$2)))

Thanks so much!!!

That's great. Why not invoke a COUNTIFS formula which is faster if you have that function?

=COUNTIFS(database!$B$2:$B$<wbr style="font-family: arial,sans-serif; font-size: 12.8px;">7,$B$1,database!$P$2:$P$7=<wbr style="color: rgb(87, 65, 35); font-family: arial, sans-serif; font-size: 12.800000190734863px;">"AA",database!$M$2:$M$7,">="&$B$<wbr style="color: rgb(87, 65, 35); font-family: arial, sans-serif; font-size: 12.800000190734863px;">2,database!$M$2:$M$7,"<="&$C$2)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top