It depends to some extent on whether you want a summarised invoice for each customer per month or an invoice for each sale item. I'll assume the latter for the moment.
Assuming the table is in a pukka database format, i.e. one row for for each sale, and that one of the column fields contains a unique Invoice number reference, the approach I'd adopt is to set out your invoice proforma with cells for the information from the various columns of the database. One of the cells will be the unique Invoice reference. Name that cell say 'InvNo'
In that unique invoice cell enter one of the invoice numbers. Now for all the other cells use a formula like the following. For example one of the cells will be a 'date' cell. Assuming the database is on Sheet 1 and column B contains the date and column A the unique invoice reference:
follow the same approach for all the other cells required by the invoice.
When you have this working the next step would be to automate the whole process so that you could set a macro running which would change the invoice reference and print the invoices one after another - but first things first.