How about an example of your data ???
It's kind of a weird spreadsheet. There are a lot of blank rows for formatting purposes and such. This is printed and needs to look a certain way. All the data is pulled from other sheets. I want them to be able to click a button and it will delete any pages that are not being utilized. They have to do this often and can't waste time manually deleting sheets. I tried using formulas and auto filters to hide rows that aren't being used but it prints blank pages because I have the pages set up a specific way. The indirect formulas are because they need to be able to delete rows and columns and not affect the formulas. I'm completely self taught through experimentation so if this is terrible, sorry!
I'll do my best.
[TABLE="class: grid, width: 1000"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]ORDER 1: PALLET 1[/TD]
[TD]
IMAGE[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CASE COUNT[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD]PO #[/TD]
[TD]=IF(INDIRECT("'Pallet Build'!L4")="","",INDIRECT("'Pallet Build'!L4"))[/TD]
[TD][/TD]
[TD][/TD]
[TD]PALLET: 1 OF[/TD]
[TD]=INDIRECT("'Pallet Build'!L6")[/TD]
[TD]=F2&G2[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!B23")="","",INDIRECT("'Pallet Build'!B23"))[/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!C23")="","",INDIRECT("'Pallet Build'!C23"))[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!B24")="","",INDIRECT("'Pallet Build'!B24"))[/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!C24")="","",INDIRECT("'Pallet Build'!C24"))[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!B25")="","",INDIRECT("'Pallet Build'!B25"))[/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!C25")="","",INDIRECT("'Pallet Build'!C25"))[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD][/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!B26")="","",INDIRECT("'Pallet Build'!B26"))[/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!C26")="","",INDIRECT("'Pallet Build'!C26"))[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!B27")="","",INDIRECT("'Pallet Build'!B27"))[/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!C27")="","",INDIRECT("'Pallet Build'!C27"))[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD][/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!B28")="","",INDIRECT("'Pallet Build'!B28"))[/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!C28")="","",INDIRECT("'Pallet Build'!C28"))[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD][/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!B29")="","",INDIRECT("'Pallet Build'!B29"))[/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!C29")="","",INDIRECT("'Pallet Build'!C29"))[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]18[/TD]
[TD][/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!B30")="","",INDIRECT("'Pallet Build'!B30"))[/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!C30")="","",INDIRECT("'Pallet Build'!C30"))[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]19[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD][/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!B31")="","",INDIRECT("'Pallet Build'!B31"))[/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!C31")="","",INDIRECT("'Pallet Build'!C31"))[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]21[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]22[/TD]
[TD][/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!B32")="","",INDIRECT("'Pallet Build'!B32"))[/TD]
[TD][/TD]
[TD]=IF(INDIRECT("'Pallet Build'!C32")="","",INDIRECT("'Pallet Build'!C32"))[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]23[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]24[/TD]
[TD][/TD]
[TD][/TD]
[TD]=SUM(C4:C23)[/TD]
[TD][/TD]
[TD][TABLE="width: 155"]
<tbody>[TR]
[TD]TOTAL CASES ON PALLET[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]25[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26[/TD]
[TD][/TD]
[TD][TABLE="width: 103"]
<tbody>[TR]
[TD]Count Performed By:[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]27[/TD]
[TD][/TD]
[TD][TABLE="width: 103"]
<tbody>[TR]
[TD]Count Verified By:[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]28[/TD]
[TD]ORDER 1: PALLET 2[/TD]
[TD]
IMAGE[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CASE COUNT[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]29[/TD]
[TD][/TD]
[TD]PO #[/TD]
[TD]=IF(INDIRECT("'Pallet Build'!L4")="","",INDIRECT("'Pallet Build'!L4"))[/TD]
[TD][/TD]
[TD][/TD]
[TD]PALLET: 1 OF[/TD]
[TD]=INDIRECT("'Pallet Build'!L6")[/TD]
[TD]=F29&G29[/TD]
[/TR]
[TR]
[TD]30[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
This is how it appears (formulas calculated):
[TABLE="class: grid, width: 1000"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]ORDER 1: PALLET 1[/TD]
[TD]
IMAGE[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CASE COUNT[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD]PO #[/TD]
[TD]123456-10[/TD]
[TD][/TD]
[TD][/TD]
[TD]PALLET: 1 OF[/TD]
[TD]1[/TD]
[TD]PALLET: 1 OF 1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD]20[/TD]
[TD][/TD]
[TD]IT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ION[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD][/TD]
[TD][/TD]
[TD]10[/TD]
[TD][/TD]
[TD]ITEM DESCRIPTION[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]18[/TD]
[TD][/TD]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[TD]ITEM DESCRIPTION[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]19[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD][/TD]
[TD][/TD]
[TD]100[/TD]
[TD][/TD]
[TD]ITEM DESCRIPTION[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]21[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]22[/TD]
[TD][/TD]
[TD][/TD]
[TD]10[/TD]
[TD][/TD]
[TD]ITEM DESCRIPTION[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]23[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]24[/TD]
[TD][/TD]
[TD][/TD]
[TD]247[/TD]
[TD][/TD]
[TD]TOTAL CASES ON PALLET[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]25[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26[/TD]
[TD][/TD]
[TD]COUNT PERFORMED BY:[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]27[/TD]
[TD][/TD]
[TD]COUNT VERIFIED BY:[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]28[/TD]
[TD]ORDER 1: PALLET 2[/TD]
[TD]
IMAGE[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CASE COUNT[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]29[/TD]
[TD][/TD]
[TD]PO #[/TD]
[TD]123456-10[/TD]
[TD][/TD]
[TD][/TD]
[TD]PALLET: 2 OF[/TD]
[TD]1[/TD]
[TD]PALLET: 2 OF 1[/TD]
[/TR]
[TR]
[TD]30[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
So, rows 1:27 are page 1. Rows 28:54 are page 2. This repeats until row 3420. They pull information for everything that will be on Pallet 1, page 2 is for pallet 2, etc. There is the possibility that each order will have up to 6 pallets. All the information from another sheet needs pulled onto this sheet. If there are fewer than 6 pallets it needs to delete the pages for whatever excess pallets there are.
I apologize if this is too confusing. Maybe this will help. Maybe it won't. Thank you!!