How do I avoid printing empty pages only with bordered cells with formulas?

Hello. I created a sheet where I subtract values of two columns and obtain the result on another.
I used this formulas
=IF($F7="";"";$D7-$H7)
and
=D6-H6
I populated the column with the first formula, in case the result is zero I give the value empty to the cell but the pages with empty cells (only have the formula) with borders are printed.
The column is populated with the second formula the column as zero values I went to Menu → Format → Page - > Sheet → Print → Disable Shows Zeros
The cells are empty but the pages with empty cells (only have the formula) with borders are printed.
If the sheet as bordered cells with no formula the page is not printed.
How do I avoid printing empty pages only with bordered cells with formulas?

Hve you tested wit Menu/Tools/Options/LIbreOffice calc/Print - Suppress output of empty pages.

yes I have.

When I wanted to print a (MS works) spreadsheet I would go in to print set up.

I ticked the box for “print grid lines”, but ALSO highlighted every cell that I wanted to be included in the printing.

Highlighting the relevant cells was done last, just pior hitting the print button.

Let us know how you get on