This seems to be a bit of a toughie, can't find any help on the internet anywhere.

I work in Admin and, for export sales, we are required to export orders in sage to excel for customs use.

I have created macros to fill in the customs form for customers name, address, date, delivery address and invoice address etc.

The problem I have, different customers order a different number of items, some order 5 different items so I only require 5 lines whereas some customers order 30 different items so I require 30 lines on Excel.

We don't want to have an excel sheet with 30 lines just in case somebody orders 30 items. We want to create a macro which determines how many items there are, and creates that many lines so they can all fit on the spreadsheet.

I don't think I've explained this very well. If anybody needs further explanations I am happy to try.

Thanks to anyone who can help.