List

G

Guest

The information below would be on worksheet named “Sheet1â€
A B C
Cust id Product code Amount

1 10006 RFUUK 2000.00
2 10010 RFUUK 2000.00
3 10030 RFUOS 3000.00


I need help to write a macro to carry out the following actions,

1. I would like to have the information for each row on a specific position
(e.g. A1, A12 and C12) on another worksheet (e.g. named “Sheet2â€) then print
that page.

2. Repeat the above cycle for the each row for the list on “Sheet1â€.

Thanks. Any help appreciated.
 
B

Bob Phillips

Public Sub ProcessData()
Dim i As Long
Dim iLastRow As Long

With ActiveSheet

iLastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = 1 To iLastRow
.Cells(i, "A").Copy Worksheets("Sheet2").Range("A1")
.Cells(i, "B").Copy Worksheets("Sheet2").Range("A12")
.Cells(i, "C").Copy Worksheets("Sheet2").Range("C12")
Worksheets("Sheet2").PrintOut
Next i
End With

End Sub


--
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