SUMIFS Unique Values

ramibassad

New Member
Joined
Feb 7, 2022
Messages
6
Office Version
  1. 2019
Platform
  1. Windows
Hello...Can someone help me get the desired result in the table below? I want Excel to only sum unique billed amount values based on a claim number. A simple SUMIF formula would return $9,500 but if we exclude the duplicate dollar amounts, the desired value of $4,750 is returned. Anyway to do this?

Claim #Date of ServiceBilled Amount
86273561410/5/20211000
86273561410/5/20211500
86273561410/5/20212000
86273561410/5/2021250
86273561410/5/20211000
86273561410/5/20211500
86273561410/5/20212000
86273561410/5/2021250
53524634710/9/20191000
Input Claim #862735614
Desired Result$ 4,750.00
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Try:

Book1 (version 1).xlsb
ABC
1Claim #Date of ServiceBilled Amount
286273561410/5/20211000
386273561410/5/20211500
486273561410/5/20212000
586273561410/5/2021250
686273561410/5/20211000
786273561410/5/20211500
886273561410/5/20212000
986273561410/5/2021250
1053524634710/9/20191000
11
12Input Claim #862735614
13Desired Result$4,750.00
Sheet4
Cell Formulas
RangeFormula
B13B13=SUMPRODUCT(C2:C10,--(A2:A10=B12),--IFERROR(MATCH(B12&"|"&C2:C10,A2:A10&"|"&C2:C10,0)=ROW(C2:C10)-ROW(C2)+1,0))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Just something to think about...

Given that it appears that you can have multiple lines for the same Claim # and Date (not sure if these are different line items for a particular invoice or what), are you saying that it is not possible to have two distinct line items that just happened to be the same dollar amount (and hence, should really be counted separately, even though they may be the same amount)?

Don't know if that is possible, as we really do not know the background on this.
But just something to think about, in case those three fields are really not enough to determine what is a duplicate and what is not.
 
Upvote 0
Another way that seems to work.

Book1 (version 2).xlsb
ABC
1Claim #Date of ServiceBilled Amount
286273561410/5/20211000
386273561410/5/20211500
486273561410/5/20212000
586273561410/5/2021250
686273561410/5/20211000
786273561410/5/20211500
886273561410/5/20212000
986273561410/5/2021250
1053524634710/9/20191000
11
12Input Claim #862735614
13Desired Result4750
Sheet6
Cell Formulas
RangeFormula
B13B13=SUMPRODUCT((A2:A11=B12)*IF(FREQUENCY(C2:C11,C2:C11)>0,1,0)*C2:C11)
 
Upvote 0

Forum statistics

Threads
1,215,620
Messages
6,125,876
Members
449,268
Latest member
sGraham24

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