change print range using macro

pomptonian

New Member
Joined
Aug 17, 2011
Messages
1
Hi All,

i have a spreadsheet that is setup to print the two left most columns. In rows 3 and 5, it is pulling in data from a different worksheet in the same workbook. the data in row 3 are employee names, and the data in row 5 are employee locations. whenever the data in row 5 changes, e.g. a new location, I would like a new page to print from that point on until the data changes again. for example, columns c thorugh j might have location 1234, columns k through o might have location 2345 and columns p through u might have 3456. whenever the data changes in row 5, the location code, a new page should print. this way all employee in the same location would print together on the same page and the next range of employees will print on another page. any help would be appreciated.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

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