Copy and paste macro partially working

andre232

New Member
Joined
Sep 19, 2017
Messages
15
A few days ago I posted on here asking for help with a basic macro to copy info from one page to the other then print. It worked well until I needed to add one more area to copy and paste. It is copying info from a column that when a number is typed in the top cell, it auto increments with a A1+1 type of function. For some reason when it prints the pages, the first two pages (from the first two cells in the column) are the only ones that these numbers show up on and the rest of the pages that print off are blank.

Dim UsdRws As Long
Dim Cnt As Long


Sheets("Summary").Select
UsdRws = Cells.Find("*", After:=Range("A1"), SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row

With Sheets("Invoice")
For Cnt = 15 To UsdRws
.Range("D19") = Range("D" & Cnt)
.Range("D20") = Range("C" & Cnt)
.Range("D21") = Range("E" & Cnt)
.Range("A10") = Range("A" & Cnt)
.Range("C7") = Range("G" & Cnt)
.PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:=False
Next Cnt
End With


End Sub



It is the ".Range("C7") = Range("G" & Cnt) line that is not working correctly. Thanks in advance
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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