Return Top 5 Accounts while excluding accounts placed on an "Exclusion" list

rhogsett

New Member
Joined
Jul 23, 2014
Messages
16
I have a list of customer accounts with various past due balances. I would like a formula to rank the accounts based on past due values while excluding specific accounts that have been placed on a separate "Do Not Include" list.

I have used LARGE, which works great until I need to exclude certain accounts from the Top 5 List. I am having difficulty finding/constructing a formula that can achieve the exampled Top 5 Highest Past Due Accounts below.

Please see the example below and please do let me know if there are questions I may clarify.

I have the report below...

Aging Report:[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]Account #[/TD]
[TD="align: center"]Customer Name[/TD]
[TD="align: center"]Past Due Amount[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]1A[/TD]
[TD="align: center"]Alpha[/TD]
[TD="align: center"]1,000[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]2B[/TD]
[TD="align: center"]Bravo[/TD]
[TD="align: center"]15,000[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]3C[/TD]
[TD="align: center"]Charlie[/TD]
[TD="align: center"]20,000[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]4D[/TD]
[TD="align: center"]Delta[/TD]
[TD="align: center"]5,000[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]5E[/TD]
[TD="align: center"]Echo[/TD]
[TD="align: center"]2,500[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]6F[/TD]
[TD="align: center"]Foxtrot[/TD]
[TD="align: center"]15,000[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]7G[/TD]
[TD="align: center"]Golf[/TD]
[TD="align: center"]17,000[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]

...that needs to evaluate the exclusion list below...

Do Not Include:
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]Excluded Account #[/TD]
[TD="align: center"]Excluded Customer Name[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]2B[/TD]
[TD="align: center"]Bravo[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]3C[/TD]
[TD="align: center"]Charlie[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

...in order to produce the results below:

Top 5 Highest Past Due Accounts:
[TABLE="width: 500"]
<tbody>[TR]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD="align: center"]20[/TD]
[TD="align: center"]Account #[/TD]
[TD="align: center"]Customer Name[/TD]
[TD="align: center"]Past Due Amount[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]21[/TD]
[TD="align: center"]7G[/TD]
[TD="align: center"]Golf[/TD]
[TD="align: center"]17,000[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]22[/TD]
[TD="align: center"]6F[/TD]
[TD="align: center"]Foxtrot[/TD]
[TD="align: center"]15,000[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]23[/TD]
[TD="align: center"]4D[/TD]
[TD="align: center"]Delta[/TD]
[TD="align: center"]5,000[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]24[/TD]
[TD="align: center"]5E[/TD]
[TD="align: center"]Echo[/TD]
[TD="align: center"]2,500[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]25[/TD]
[TD="align: center"]1A[/TD]
[TD="align: center"]Alpha[/TD]
[TD="align: center"]1,000[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]

Any assistance is greatly appreciated! Please let me know where I can provide further clarification.

Thank you,

RGH
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi,

try this:

Book1
ABCD
1Account #Customer NamePast Due Amount
21AAlpha15
32BBravo15
43CCharlie20
54DDelta53
65EEcho2,54
76FFoxtrot152
87GGolf171
9
10Excluded Account #Excluded Customer Name
112BBravo
123CCharlie
Sheet2
Cell Formulas
RangeFormula
D2=IF(ISNUMBER(MATCH(B2,$B$11:$B$12,0)),"",1+SUMPRODUCT(($B$2:$B$8<>B$11)*($B$2:$B$8<>$B$12)*($C$2:$C$8>C2)))
 
Last edited:
Upvote 0
To output what is posted above in row 21:25 first array enter this formula in D23 as in below and fill down.

=LARGE(IF(ISNA(MATCH($B$2:$B$8,$B$15:$B$16,0)),$D$2:$D$8),ROWS($1:1))

If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter. (CSE for short.)

Then array enter this one in B23 as in below, fill down and across.

=INDEX(B$2:B$8,SMALL(IF(($D23=$D$2:$D$8)*(ISNA(MATCH($B$2:$B$8,$B$15:$B$16,0))),ROW($B$2:$B$8)-MIN(ROW($B$2:$B$8))+1),COUNTIF($D$23:$D23,$D23)))

Assumes source data is in B2:D8 and exclude data is in B15:C16


[Table="width:, class:grid"][tr][td]Row\Col[/td][td]
A​
[/td][td]
B​
[/td][td]
C​
[/td][td]
D​
[/td][/tr][tr][td]
22​
[/td][td]
20​
[/td][td]Account #[/td][td]Customer Name[/td][td]Past Due Amount[/td][/tr]
[tr][td]
23​
[/td][td]
21​
[/td][td]7G[/td][td]Golf[/td][td]
17000​
[/td][/tr]
[tr][td]
24​
[/td][td]
22​
[/td][td]6F[/td][td]Foxtrot[/td][td]
15000​
[/td][/tr]
[tr][td]
25​
[/td][td]
23​
[/td][td]4D[/td][td]Delta[/td][td]
5000​
[/td][/tr]
[tr][td]
26​
[/td][td]
24​
[/td][td]5E[/td][td]Echo[/td][td]
2500​
[/td][/tr]
[tr][td]
27​
[/td][td]
25​
[/td][td]1A[/td][td]Alpha[/td][td]
1000​
[/td][/tr]
[/table]
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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