Unapplied Receipts - clever way to apply them to outstanding invoices?

Hello,

We have thousands of small receipts unapplied in our AR module. In most of the cases it's $0.01.    Is there a way to just apply them to outstanding documents for those customers? We also have thousands of customers we would have to do this for, since it's been going on for so long. So I don't really want to just go one by one. Ideally there would be a great method using imports or something. 

Or does anyone have a clever excel formula to marry up the unapplied receipts to an invoice document with an outstanding balance? I can just run an AR Aging report to show outstanding invoices and any unapplied receipts, prepayments, or unapplied cash amounts. So I would just need to match a payment to an invoice, assuming there is room on the invoice for some of the payment. 

I know in most cases you want to match a payment to a particular invoice, but for our business that doesn't really matter and all we care about is the customers total balance, so it's fine to apply a payment to any invoice, if that helps with getting this cleaned up.