assign the same macro to every line in worksheet

G

Guest

I work in retail. We use an excel sprreadsheet which has our entire load in
all are range in for a season.
The data consists of columns : VENDOR, LINE no, LINE descr, QTY, and price.

I want to use this excel chart to automatically create ORDER forms. I have
set up a macro for the first item (first excel row). Now i want to create a
macro that takes the next item (second excel row) and creates a new order
form.
1) Is this possible?
2) Can you create a new excel doc per order form?
 
B

Bob Phillips

All you need to do is loop through all the items

For i = 2 To Cells(Rows.Count,"A").End(xlUp).Row

Next i

and for each row, create the new sheet

Set oWs = worksheets.Add after:=Worksheets(Worksheets.Count))

and move the data to the new sheet

oWs.Range("A1").Value = Cells(i,"A").Value

but you will need to fill out the rest unless you have a template.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top