VBA to automatically Paste and Resize

crvazquez954

New Member
Joined
Jul 9, 2019
Messages
23
Hello everyone, I have an Excel project I'm working on which requires me to have a table on one tab and a proposal on another tab printed on the same page. Because the table has certain rows and columns that hide depending on the users input it's impossible for me to simply have the table and report next to each other and set them both in the same print area. It seems the only solution is to copy the table and paste it on the report. However, the problem I am having is getting the report to automatically resize if it extends past the reports print area. Can anyone help me write a VBA code that will copy A2:N44 in the "ProposalTable" tab and paste it in C184 of the "Proposal" tab and resize if necessary (i.e. if the width is more than 7.9")?
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,214,825
Messages
6,121,788
Members
449,049
Latest member
greyangel23

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