Sum of a column (w/out duplicates) based on 3 conditions

Estimator_J

New Member
Joined
Nov 23, 2016
Messages
4
Hello,

I have one column where the "State" is listed.
Another column states "Public" or "Private".
I would like to sum the "Amount" column for each state based on public or private.
However, there are duplicates in the amount column so I need the result to not include duplicates.

I have another formula for figuring out the amount based on state only but I would like to take it a step further and add another condition, public or private. Does anyone have an idea of how to structure the formula for the third condition?

Thank you!
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hi,

Take a look at this and see if this will help:


Book1
ABCDE
1statestatusamountFlorida
2FloridaPublic100Public
3FloridaPrivate200201
4TexasPublic100
5TexasPrivate200
6FloridaPublic101
7FloridaPrivate200
8TexasPublic102
9TexasPrivate200
Sheet1
Cell Formulas
RangeFormula
E3{=SUM(IF(FREQUENCY(IF(A2:A9=E1,IF($B$2:$B$9=E2,IF($C$2:$C$9<>"",MATCH($C$2:$C$9,$C$2:$C$9,0)))),ROW($B$2:$B$9)-ROW($B$2)+1),$C$2:$C$9))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
It worked beautifully! Thank you!
Hi,

Take a look at this and see if this will help:

ABCDE
1statestatusamountFlorida
2FloridaPublic100Public
3FloridaPrivate200201
4TexasPublic100
5TexasPrivate200
6FloridaPublic101
7FloridaPrivate200
8TexasPublic102
9TexasPrivate200

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Array Formulas
CellFormula
E3{=SUM(IF(FREQUENCY(IF(A2:A9=E1,IF($B$2:$B$9=E2,IF($C$2:$C$9<>"",MATCH($C$2:$C$9,$C$2:$C$9,0)))),ROW($B$2:$B$9)-ROW($B$2)+1),$C$2:$C$9))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,733
Members
448,987
Latest member
marion_davis

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