Forum Discussion
mtlbooks
Dec 18, 2022Copper Contributor
how do i make exel split an amount throghout a few celles
I take the train every day for a round trip, and I buy every few days a multiple-trip ticket I went. Excel should split the amount I paid for the ticket by the number of trips the ticket has and calculate two trips a day. I hope this was clear enough!
3 Replies
- PeterBartholomew1Silver Contributor
= IF(trips>0, 2*paid/trips, "")
- mtlbooksCopper ContributorThanks! it seems I was not that clear, when I will enter your formula it filles in just cell c1, but I want it to fill atoumaticley every day until the tripes are used up. In this case it will be c2:c4.
- PeterBartholomew1Silver Contributor
Is this closer?
It is not so simple though,
= IFNA(DROP( REDUCE("", SEQUENCE(ROWS(paid)), LAMBDA(list, k, LET( t, INDEX(trips, k) / 2, p, INDEX(paid, k), r, IF(t > 0, IF(SEQUENCE(t), p / t)), VSTACK(list, HSTACK(k, r)) ) ) ), 1),"")