Copy selection range and paste in a specific sheet

Unexpc

Active Member
Joined
Nov 12, 2020
Messages
496
Office Version
  1. 2019
Platform
  1. Windows
Hi guys
i want when i select a range, after that with run a macro, doing this 3 steps
Paste in a sheet that named Sheet from cell A3
after that print from a sheet that named Print
after that clear contents from A3 until rows of sheet that named Sheet be ended...
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
For me Print all rows until 34th?
1 .How many blank rows you have until Last row? if more than 2, then additional values not printed, (for e.g. if you have 4 blank row then 4-2 = 2 rows not printed at last
2. Also you told me until 34 row at page 1 then each more 32 rows add one Page?
 
Upvote 0
For me Print all rows until 34th?
if print 33 or 34 rows and all count that in print page fill first and second row of each page, that not pages in print, for example if 2 row fill, that not print, if 33 or 34 row fill that not print and for page 3, 65 and 66 and next pages like this (each page receive 32 data from !Sheet and if in the last page fill just two first rows of that page, this page not printed)
How many blank rows you have until Last row? if more than 2, then additional values not printed, (for e.g. if you have 4 blank row then 4-2 = 2 rows not printed at last
what you mean blank rows in this file?, i select all active cells and click print button that you compile but i have this problem with two rows at first in each page that not printed all that page (the last page that have this condition)
 
Last edited:
Upvote 0
I don't know why? for me working correctly when fill 34 & 66 rows.
 

Attachments

  • 13456.jpg
    13456.jpg
    91.3 KB · Views: 5
Upvote 0
I don't know why? for me working correctly when fill 34 & 66 rows.
Disordered order for you i think the row height causes this, please see this photo, this is correct order, and when 33 and 34 is fill, not printed page 2
 

Attachments

  • image_2021-09-22_113126.png
    image_2021-09-22_113126.png
    7.3 KB · Views: 5
Upvote 0
Until fill 34 rows, only print page 1, because you want them at page 1
you want 34 row for first page then 32 rows for page 2 and later.
if you want different we should change code.
Rich (BB code):
n = Int((L - Fr - 2) / 32) + 1
Sheets(j + 1).PageSetup.PrintArea = Sheets(j + 1).Range("A1:H" & n * 34 + 6).Address
At first line -2 shows that the first page should has 2 more rows from 32, if you want 34 rows it is correct, if you want 33 rows convert -2 to -1
Also at second row you should change number of rows you printed at page 1 except 6 row headers. if you want 34 row it is correct. if you want 33, you should change it to 33
 
Upvote 0
Until fill 34 rows, only print page 1, because you want them at page 1
you want 34 row for first page then 32 rows for page 2 and later.
if you want different we should change code.
Rich (BB code):
n = Int((L - Fr - 2) / 32) + 1
Sheets(j + 1).PageSetup.PrintArea = Sheets(j + 1).Range("A1:H" & n * 34 + 6).Address
At first line -2 shows that the first page should has 2 more rows from 32, if you want 34 rows it is correct, if you want 33 rows convert -2 to -1
Also at second row you should change number of rows you printed at page 1 except 6 row headers. if you want 34 row it is correct. if you want 33, you should change it to 33
the problem just this, i don't know how does it, and i think months ago i change this sheet for add two data and decrease rows page 1 into 32, so with your guide, this solved, THANK YOU
 
Upvote 0
1. Why page setup for print added to Sheet Worksheet and Not to Print Worksheet?
2. I didn't see code for Print area at this file. where you add it?
 
Upvote 0

Forum statistics

Threads
1,223,948
Messages
6,175,571
Members
452,652
Latest member
eduedu

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