Forum Discussion
excel formula assist
- Jan 17, 2024
If you're looking to 'staircase' the payments like this:
The attached workbook will continue to do this even if you go beyond 12 months.
I created a Lambda to generate the full 12 months:
'PaySched(salesmonths,sales,downpayment,contractpayment,years)
=LET(
n, COUNTA(salesmonths),
payments, years * 4 - 1,
width, years * 12 + (n + 2),
start_date, MIN(salesmonths),
dates, DATE(YEAR(start_date), MONTH(start_date) + SEQUENCE(, width, 0), 1),
GetPayments, LAMBDA(a, v,
LET(
sales_amt, XLOOKUP(v, salesmonths, sales),
down_amt, sales_amt * downpayment,
contract_amt, sales_amt * contractpayment,
remaining, sales_amt - (down_amt + contract_amt),
quarterly_payment, remaining / payments,
resized, EXPAND(EXPAND(quarterly_payment, , payments, quarterly_payment), 3, , 0),
quarterly_arr, TOROW(resized, , 1),
upfront, HSTACK(down_amt, 0, 0, contract_amt, 0, 0),
padding, EXPAND(0, , MONTH(v) - 1, 0),
all_payments, HSTACK(upfront, quarterly_arr),
outcome, IF(MONTH(v) = 1, all_payments, HSTACK(padding, all_payments)),
IFERROR(VSTACK(a, outcome), 0)
)
),
Payment_Schedule, REDUCE(dates, salesmonths, GetPayments),
IF(
ROWS(salesmonths) = ROWS(sales),
HSTACK(VSTACK("", salesmonths), Payment_Schedule),
"Please be sure the number of months selected equals the number of sales figures selected."
)
)Thank you Mr. Patrick for your valuable assist, when i add lines by modifying the range i notice the below, is it correct or i did something wrong as i have to add a forecasted sales till 2026 by month
Thank you
- Hussein_MohamedFeb 08, 2024Brass Contributor
I would like to express my deep gratitude for your generosity and assistance in my task.
You are successfully facilitating a challenging task that took me a significant amount of time to accomplish
- Patrick2788Jan 17, 2024Silver ContributorYou're welcome!
- Hussein_MohamedJan 17, 2024Brass Contributor
Thank you for such a wonderful contribution
- Patrick2788Jan 17, 2024Silver Contributor
If you're looking to 'staircase' the payments like this:
The attached workbook will continue to do this even if you go beyond 12 months.
- Hussein_MohamedJan 17, 2024Brass ContributorI don't need to show the total at the end of each month. I just want a breakdown of the installments per month
- Patrick2788Jan 17, 2024Silver Contributor
Are you trying to find totals all the way across for each month? You may have to include the workbook.