Need to sum values if certain criteria is met until a value is met, after that all other values that meet criteria return zero.

Checkhe

New Member
Joined
Dec 11, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hey all,

New to posting so I apologies if I fumble translating my excel need into words. Happy to clarify any confusion.

I am working on a borrowing base model where Notes are pledged rather than typical A/R and Inventory. I have worked in certain limiting factors such as state, property type, days past due, and LTV to name a few. The way I have done it is not likely the most efficient way, but the model is working as intended. I'm certainly not the most proficient in excel.

My goal, while keeping all the other limitations in place, is this:

On an aggregate basis, no notes located in Oregon may comprise more than 20% of the asset pool. Once the sum of all notes located in Oregon reach 20% of the asset pool, a $0 value is return for any following notes located in Oregon.

  1. The state and UPB are manual inputs.
  2. The % of asset pool is a formula.
  3. I have hardcoded the numbers in the "Needed Return" column to show what number I need returned from a formula. The "As a %" is just to display the aggregate percentage.
    • Please note that neither the "Needed Return" nor "As a %" columns exist in the model.
  4. Since the first Oregon note of $5MM is only 12.5% of the total asset pool, the full amount carries through.
  5. Since the second Oregon note of $5MM on an aggregate basis with the note above exceeds 20% of the total asset pool, only $3MM carries through. This results in these two Oregon notes equaling 20% of the asset pool.
  6. Given that the 20% of asset pool has already been met for Oregon, the third note of $10MM (and all following Oregon notes) carries through no amount and returns a zero.

1687545778178.png


Any assistance that anyone can provide would be greatly appreciated. Thank you!
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Do you know the size of the asset pool ahead of time (in this case $40M)? I'm assuming you do, otherwise you wouldn't be able to process the first note for OR. Maybe something like this?
MrExcel_20230623.xlsx
ABCDE
1StateUPB% of Asset PoolNeeded ReturnAs a %
2OR$ 5,000,000.0012.5%$ 5,000,000.0012.5%
3OR$ 5,000,000.0012.5%$ 3,000,000.007.5%
4OR$ 10,000,000.0025.0%$ -0.0%
5AZ$ 10,000,000.0025.0%$ 10,000,000.0025.0%
6AZ$ 10,000,000.0025.0%$ 10,000,000.0025.0%
7$ 40,000,000.00100.0%$ 28,000,000.0070.0%
Sheet2
Cell Formulas
RangeFormula
C2:C6,E2:E6C2=B2/$B$7
D2:D6D2=IF(A2="OR",MAX(0,MIN(B2,0.2*$B$7-SUMIF(A$1:A1,"OR",B$1:B1))),B2)
B7:E7B7=SUM(B2:B6)
 
Upvote 0
Do you know the size of the asset pool ahead of time (in this case $40M)? I'm assuming you do, otherwise you wouldn't be able to process the first note for OR. Maybe something like this?
MrExcel_20230623.xlsx
ABCDE
1StateUPB% of Asset PoolNeeded ReturnAs a %
2OR$ 5,000,000.0012.5%$ 5,000,000.0012.5%
3OR$ 5,000,000.0012.5%$ 3,000,000.007.5%
4OR$ 10,000,000.0025.0%$ -0.0%
5AZ$ 10,000,000.0025.0%$ 10,000,000.0025.0%
6AZ$ 10,000,000.0025.0%$ 10,000,000.0025.0%
7$ 40,000,000.00100.0%$ 28,000,000.0070.0%
Sheet2
Cell Formulas
RangeFormula
C2:C6,E2:E6C2=B2/$B$7
D2:D6D2=IF(A2="OR",MAX(0,MIN(B2,0.2*$B$7-SUMIF(A$1:A1,"OR",B$1:B1))),B2)
B7:E7B7=SUM(B2:B6)
Hi KRice,

To answer your question, the size of the asset pool will scale up and down based on the number of notes input into the model. With that said, I used the formula you provided and it appears to be a working solutions. I will take some time this weekend to stress test the model for scenarios that break the functionality. If I do find a scenario, I'll reach back out. If not, thank you very very much for taking the time to respond! Cheers!!
 
Upvote 0
That sounds good...just let me know what you discover. I suspect one issue then will be the reference to cell $B$7 where I've assumed (probably incorrectly) that it represents the sum of notes above it. Instead, it sounds as if $B$7 should refer to some schedule relating the number of notes above it to a total pool amount. If that is true, then you will probably want another logic check to confirm that any potential note to be added will not, when considered in the aggregate will all other notes, exceed the total pool amount?
 
Upvote 0
That sounds good...just let me know what you discover. I suspect one issue then will be the reference to cell $B$7 where I've assumed (probably incorrectly) that it represents the sum of notes above it. Instead, it sounds as if $B$7 should refer to some schedule relating the number of notes above it to a total pool amount. If that is true, then you will probably want another logic check to confirm that any potential note to be added will not, when considered in the aggregate will all other notes, exceed the total pool amount?
For my use, I haven't yet found a way to break your solution. I will keep trying to find something in the meantime, but I greatly appreciate you taking the time to respond to my post. Thank you greatly!
 
Upvote 0

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

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