Macro to shift horizontal page break to the closest drawn border

sinnertie

New Member
Joined
Mar 29, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I am looking for a macro that will be able to shift the automatically generated page breaks either up or down to the nearest drawn border as shown in the picture. I generate a list of loads that we will be sending out on a daily basis and I cannot have half of the load on one page and the rest on the other. It has to be together. Would anyone be able to help as I tried some solutions found over the internet but they don't seem to be working or are semi-working (on part of the document only)
 

Attachments

  • 21212.PNG
    21212.PNG
    41.7 KB · Views: 6
  • 212.PNG
    212.PNG
    59.3 KB · Views: 6

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Is anyone able to help? I can provide an excel sheet if necessary. It is really important for me as it would save a lot of time at work on a daily basis so I would greatly appreciate any help, please.
 
Upvote 0

Forum statistics

Threads
1,214,848
Messages
6,121,914
Members
449,054
Latest member
luca142

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