Hey all,
Please see attached spreadsheet for examples.
In this workbook, I have purposely made all the payments (Column I) not quite offset the sales amounts (Column H)
I need a macro that will look at the subtotaled due bill amount, and apply a forward balance to the customer.
Since I’m not quite sure how to put this into words, I’ll describe exactly what I’m hoping the macro will do to the example spreadsheet:
• Row 7 is -$0.01, so delete rows 2 through 5, change cell H6 to 0 and change cell I6 to 0.01. Add an “FB” at the end of inv# 10550 in cell G6 (FB for Forward Balance)
• Row 11 is $20.00. Since it’s less than the last invoice for that customer, apply a forward balance to it by: Deleting rows 8 and 9, change cell I10 to zero, change cell H 10 to $20.00 and add an FB to the end of inv# 25779 in cell G10.
• Row 14 is -$10.00. Delete row 12, change cell H13 to zero and change cell I13 to $10.00. Add an “FB” to the end of inv# 98779 in cell G13
• Row 24 is -$1.36, so delete rows 15 through 22. Change cell H23 to zero and change cell I23 to $1.36. Add an “FB” at the end of invoice # 11120 in cell G23
• Row 28 is $2.00, so delete rows 25 and 26, change cell I27 to zero and change cell H27 to $2.00. Add an “FB” to the end of inv# 10103 in cell G27.
Please let me know if any additional clarification is required.
forward balances.xlsm
Bookmarks