Copying and Looping

Toonloon

Board Regular
Joined
Dec 13, 2005
Messages
98
Hi All,

I have Sheet1 and Sheet2

I have a list of numbers on Sheet2

I want to be able to create a macro that will
1. copy the 1st number on the list in Sheet2
2. paste it to cell D3 on Sheet1
3. print sheet1
4. copy the 2nd number on the list on Sheet2
5. paste it to cell D3 on Sheet1
5. print sheet1
Continue looping through that process until the end of the list is reached on Sheet2

anybody have any ideas ?

Thanks in advance
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Try

Code:
Sub test()
Dim LR As Long, i As Long
With Sheets("Sheet2")
    LR = .Range("A" & Rows.Count).End(xlUp).Row
    For i = 1 To LR
        .Range("A" & i).Copy Destination:=Sheets("Sheet1").Range("D3")
        Sheets("Sheet1").PrintOut
    Next i
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,226,588
Messages
6,191,891
Members
453,685
Latest member
leoj9090

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top