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

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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