Count based on conditions

acsmiamiguy

New Member
Joined
Jan 1, 2018
Messages
8
A B
4805 50.00
4805 45.00
4805 0.00
4900 0.00
4900 0.00
5010 48.00
5010 62.00
5010 58.00

In the above table column A has claim numbers, and column B amounts paid. A claim can be either partially paid (#4805); not paid at all (#4900) or fully paid (#5010).

Is it possible to get a count of the number of claims that are partially paid, fully paid or not paid?

Thanks!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
How do you know what status the claim is? Do you have a list with total amount due?
 
Upvote 0
Try
Code:
[RANGE=cls:xl2bb-100][XR][XH=cs:9]Book1[/XH][/XR][XR][XH][/XH][XH]A[/XH][XH]B[/XH][XH]C[/XH][XH]D[/XH][XH]E[/XH][XH]F[/XH][XH]G[/XH][XH]H[/XH][/XR][XR][XH]1[/XH][XD=h:r]4805[/XD][XD=h:r]50[/XD][XD=h:r][/XD][XD=h:l]no payment[/XD][XD=h:r|cls:fx][FORMULA==SUMPRODUCT(--(SUMIF($A$1:$A$10,$G$2:$G$5,$B$1:$B$10)=0))]1[/FORMULA][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:l]Total due[/XD][/XR][XR][XH]2[/XH][XD=h:r]4805[/XD][XD=h:r]45[/XD][XD=h:r][/XD][XD=h:l]Partial[/XD][XD=h:r|cls:fx][FORMULA==SUMPRODUCT(--(SUMIF($A$1:$A$10,$G$2:$G$5,$B$1:$B$10)&lt;$H$2:$H$5)*--(SUMIF($A$1:$A$10,$G$2:$G$5,$B$1:$B$10)&lt;&gt;0))]1[/FORMULA][/XD][XD=h:r][/XD][XD=h:r]4805[/XD][XD=h:r]200[/XD][/XR][XR][XH]3[/XH][XD=h:r]4805[/XD][XD=h:r]0[/XD][XD=h:r][/XD][XD=h:l]fully paid[/XD][XD=h:r|cls:fx][FORMULA==SUMPRODUCT(--(SUMIF($A$1:$A$10,$G$2:$G$5,$B$1:$B$10)=$H$2:$H$5))]2[/FORMULA][/XD][XD=h:r][/XD][XD=h:r]4900[/XD][XD=h:r]666[/XD][/XR][XR][XH]4[/XH][XD=h:r]4900[/XD][XD=h:r]0[/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r]5010[/XD][XD=h:r]168[/XD][/XR][XR][XH]5[/XH][XD=h:r]4900[/XD][XD=h:r]0[/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r]5777[/XD][XD=h:r]69[/XD][/XR][XR][XH]6[/XH][XD=h:r]5010[/XD][XD=h:r]48[/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][/XR][XR][XH]7[/XH][XD=h:r]5010[/XD][XD=h:r]62[/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][/XR][XR][XH]8[/XH][XD=h:r]5777[/XD][XD=h:r]67[/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][/XR][XR][XH]9[/XH][XD=h:r]5010[/XD][XD=h:r]58[/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][/XR][XR][XH]10[/XH][XD=h:r]5777[/XD][XD=h:r]2[/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][XD=h:r][/XD][/XR][XR][XH=cs:9][RANGE][XR][XD]Sheet1[/XD][XH][/XH][/XR][/RANGE][/XH][/XR][/RANGE][RANGE=cls:xl2bb-extra-100][XR][XH=cs:2|h:l|fw:b]Cell Formulas[/XH][/XR][XR][XH]Cell[/XH][XH]Formula[/XH][/XR][XR][XD]E1[/XD][XD]=SUMPRODUCT(--(SUMIF($A$1:$A$10,$G$2:$G$5,$B$1:$B$10)=0))[/XD][/XR][XR][XD]E2[/XD][XD]=SUMPRODUCT(--(SUMIF($A$1:$A$10,$G$2:$G$5,$B$1:$B$10)<$H$2:$H$5)*--(SUMIF($A$1:$A$10,$G$2:$G$5,$B$1:$B$10)<>0))[/XD][/XR][XR][XD]E3[/XD][XD]=SUMPRODUCT(--(SUMIF($A$1:$A$10,$G$2:$G$5,$B$1:$B$10)=$H$2:$H$5))[/XD][/XR][/RANGE]
 
Upvote 0
Sorry, I misunderstood your example. To echo Scott's question, how do you know if the account is paid or not? Assuming you have a list somewhere, you could do something like this:


ABCDEFGHI
1Account PaymentAccountOwedAccounts not paid1
24805 $ 50.004805100Accounts partially paid1
34805 $ 45.004900125Accounts fully paid1
44805 $ -5010168
54900 $ -
64900 $ -
75010 $ 48.00
85010 $ 62.00
95010 $ 58.00

<tbody>
</tbody>
Sheet12

Worksheet Formulas
CellFormula
H1=SUMPRODUCT(--(SUMIF(A:A,$D$2:$D$10,B:B)=0))
H2=COUNTA($D$2:$D$10)-H1-H3
H3=SUMPRODUCT(--(SUMIF(A:A,$D$2:$D$10,B:B)=$E$2:E$10),--($D$2:$D$10<>""))

<tbody>
</tbody>

<tbody>
</tbody>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,297
Messages
6,124,113
Members
449,142
Latest member
championbowler

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