sum with multiple critera

AlbertRBrowne

New Member
Joined
Jun 25, 2011
Messages
6
I am using ths formula to sum unique values in a range
{=SUM(IF(FREQUENCY(IF($G$30:$G$279=$I$5,MATCH($F$30:$F$279,$F$30:$F$279,0)),ROW($G$30:$G$279)-ROW($G$30)+1),1))}
I now want to add another critera in that I only want to sum if the value in another column matches a given value. Can anyone help?
Thanks

Albert
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Just add an additional IF, like:

Code:
=SUM(IF(FREQUENCY(IF($G$30:$G$279=$I$5,[COLOR=Red]IF($H$30:$H$279=$J$5,[/COLOR]MATCH($F$30:$F$279,$F$30:$F$279,0))[COLOR=Red])[/COLOR],ROW($G$30:$G$279)-ROW($G$30)+1),1))

Change the ranges I've chosen to suit your actual data.

Matty
 
Upvote 0
I am using ths formula to sum unique values in a range
{=SUM(IF(FREQUENCY(IF($G$30:$G$279=$I$5,MATCH($F$30:$F$279,$F$30:$F$279,0)),ROW($G$30:$G$279)-ROW($G$30)+1),1))}
I now want to add another critera in that I only want to sum if the value in another column matches a given value. Can anyone help?
Thanks

Albert

1) Control+shift+enter, not just enter:

=SUM(IF(FREQUENCY(IF($F$30:$F$279<>"",IF($G$30:$G$279=$I$5,MATCH($F$30:$F$279,$F$30:$F$279,0))),ROW($G$30:$G$279)-ROW($G$30)+1),1))

2) Control+shift+enter, not just enter:

=SUM(IF(FREQUENCY(IF($F$30:$F$279<>"",IF($G$30:$G$279=$I$5,IF($H$30:$H$279=$J$5,MATCH($F$30:$F$279,$F$30:$F$279,0)))),ROW($G$30:$G$279)-ROW($G$30)+1),1))

which also tests whether $H$30:$H$279 is equal to $J$5.
 
Upvote 0
I am using ths formula to sum unique values in a range
{=SUM(IF(FREQUENCY(IF($G$30:$G$279=$I$5,MATCH($F$30:$F$279,$F$30:$F$279,0)),ROW($G$30:$G$279)-ROW($G$30)+1),1))}
I now want to add another critera in that I only want to sum if the value in another column matches a given value. Can anyone help?
Thanks

Albert
Try this...

Sum unique numbers that correspond to "A"...

Book1
ABCDE
2A10_A25
3A15___
4A10___
5A15___
6B20___
7C5___
8C7___
9C7___
10C10___
Sheet1

This array formula** entered in E2:

=SUM(IF(FREQUENCY(IF(A2:A10=D2,B2:B10),B2:B10),B2:B10))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,706
Members
452,939
Latest member
WCrawford

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