orangehenry
New Member
- Joined
- Oct 26, 2015
- Messages
- 7
Hi,
I am trying to calculate how much I can pay against a given limit for multiple line items.
Currently I am doing this calculation for each line item seperately but given I am likely to have many of these (and a variable number of them) I am wondering if there is a way to do this in one line. I have been playing with an array formula but the SUM function doesn't work correctly.
In plain english, the logic is as follows: Calculate the available limit as available limit - any previously funded costs. If there is limit remaining, the pay the lesser of the requested amount or the available limit.
Can anyone assist with how to put this calculation in one line?
I am trying to calculate how much I can pay against a given limit for multiple line items.
Currently I am doing this calculation for each line item seperately but given I am likely to have many of these (and a variable number of them) I am wondering if there is a way to do this in one line. I have been playing with an array formula but the SUM function doesn't work correctly.
In plain english, the logic is as follows: Calculate the available limit as available limit - any previously funded costs. If there is limit remaining, the pay the lesser of the requested amount or the available limit.
Can anyone assist with how to put this calculation in one line?
Book5.xlsx | |||||||||
---|---|---|---|---|---|---|---|---|---|
H | I | J | K | L | M | N | |||
10 | Limit | Month | 1 | 2 | 3 | ||||
11 | Cost 1 | 100 | 50 | 100 | 50 | ||||
12 | Cost 2 | 200 | 300 | 10 | |||||
13 | |||||||||
14 | Funded 1 | 50 | 50 | 0 | |||||
15 | Funded 2 | 200 | 0 | 0 | |||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
L14:N15 | L14 | =MAX(MIN(L11-MIN(SUM($L11:L11)-$I11,L11),L11),0) |