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

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

jorismoerings

Well-known Member
Joined
Jul 4, 2014
Messages
1,486
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
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.
 

Estimator_J

New Member
Joined
Nov 23, 2016
Messages
4
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>
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,486
Messages
5,837,614
Members
430,506
Latest member
TonyIbbs

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
Top