I don't really have anything of substance to add in helping you solve your problem but it did remind me of this blog post from a few years back describing how someone solved a similar accounting problem using Python!
In reply to Re: Find combination of numbers whose sum equals X
by Leudwinus
in thread Find combination of numbers whose sum equals X
by harangzsolt33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |