Hi,
I am trying to write a macro for getting payment date against each invoice.
Eg:
Invoice Date Inv Value Customer Code Inv_No
1 Jan 15 100,0000 1 1
Payment Detials of same customer
payment Date Amt Customer code Paymentref
2 Jan 15 950000 1 1
5 Jan 15 5000 1 2
In this case i want against first invoice clearing date as 5 jan 2015(since that is the date when the entire amount is cleared.)
I have two sheets one sheet has Invoice details for all customers and other sheet has payment details for all customers.
Logic: I want VBA to read each payment line item and then compare whether it belongs to the same customer and if it is then it will compare whether payment value is greater than invoice value if it is TRUE then it will allocate current payment date as clearing date to the invoice selected. Else it will calculate inv_bal and looping will be done to achieve clearing date of each line.
Here is the code
Please help me out, it is not working and throwing Run time error '6' Overflow.![]()
Please Login or Register to view this content.
Regards
Prem
Bookmarks