Is there a way I can set a page border in Excel for when I print my worksheet?

I have a long document, with uneven cells, and some of them needs to "appear" merged so there is no border between those rows. However, when I print, I would like to be able to automatically put a border if one of those cells appears at the end of a page...

Note: for many reasons, I cannot set MANUAL page breaks. Improvising a line in the footer is also out of the question...

If you KNOW it cannot be done, please let me know!