View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Merging data in a pre determined form

You would use a macro no your data to identify all the unique locations,
then you would loop through this list applying an autofilter to the list so
for each unique location, those records that match would be visible. Then
you would copy the data to the 18 rows (clearly never using more than 18
rows at a time). After each set of 18 or less is written to the form, a
print command would be issued. then the existing data in the 18 rows would
be cleared and the process continued.

Most of the code can be gained by using the macro recorder while you do this
one time manually. Then you can take this core code and add some testing
and looping logic and generalize the references to accomplish you exact
requirements.

--
Regards,
Tom Ogilvy

Christina Collins wrote in message
...
Hi. I hope that someone can help me.

I have a form that has been set up previously in Excel
for stock counts. The form is complete with headings and
boxes at the bottom of the form to be signed once
printed. There is an are of 18 rows that I am interested
in as I want to extract data from another spreadsheet and
populate the form. That sounds easy but I also want the
form to print like criteria. Eg if there is one record
with a location of "A", I want it to print a unique
sheet. As soon as the location changes, I want to print
a new set of sheets. If there are more than 18 rows of
data within the criteria, I want to print sheets until
all items are included.

How do I do this in Excel?