Set multiple rows as page break and sorting

I have a list of birthdays and I would like to put a page break row (not printable) at the end of each month so I print pages with only jan, feb… dates.

Problem:
when I sort the the entire list (because I insert new entries) or delete old entries the page breaks don’t follow their rows.

There may not be a practicable solution based on the UI.
Resorting to Custom code it’s not difficult. See this attached example.
(To run the code in the example you need to permit “macro” execution. Check the code first for malign parts!)