Forum

Notifications
Clear all

Formula required to Distribute Invoice Payment Amount to Invoice Lines using VLOOKUP

4 Posts
3 Users
0 Reactions
105 Views
(@kevin2020)
Posts: 3
Active Member
Topic starter
 

Hey Everyone, I require a certain solution to this use case;

*Sample Data attached*

-I have a tab 'Invoices' where Invoice Name and Invoice Line Name are given along with the Invoice Line Amount in the third column of Invoice Tab.

-The second tab "Payment Amount" tab holds the payment amount for each Invoice. 

- I want to distribute the Payment amount to each of the Invoice Lines corresponding with the Invoice Name.

So Ideally the payment amount has to be distributed in a way where the first Payment Amount 1 of Invoice 1 will fill the 'distributed amount' cell with the amount until it has reached the Invoice line Amount, and then move on to the next Invoice line of Invoice 1 and fill the 'distributed amount' cell until its Invoice Line amount has been reached. I need to do this till the Payment Amount for Invoice 1 gets over and the rest of Invoice lines can be made to zero if remaining Payment Amount is 0.

I need to have an expandable formula because I will be dealing with about 10000 rows of Invoice Line. So hopefully I can just drag it till the end of all Invoice Lines.

Hope I gave some clarity on the problem,

Cheers,

Kevin 

 
Posted : 26/05/2021 8:22 am
Anders Sehlstedt
(@sehlsan)
Posts: 968
Prominent Member
 

Hello,

See if the example in column F suits your need. There is no error handling and the formula was created in tablet version of Excel, meaning it might work differently on the computer.

Br,
Anders

 
Posted : 27/05/2021 12:29 am
(@kevin2020)
Posts: 3
Active Member
Topic starter
 

Hey Anders,

thanks a lot for this formula, I've used an alternate formula with vlookup that took a lot of time to calculate due to nested IF loops. This formula seems to calculate rather quickly.

Thanks,

Kevin

 
Posted : 27/05/2021 11:29 pm
(@ones66)
Posts: 1
New Member
 

I am using a different formula, but the idea is the same, and the result as well.

 
Posted : 02/12/2021 12:58 am
Share: