Hello everyone!

I would like to ask what VBA code would help me with this problem I have.
I have a hide row function on my sheet where if a cell in A1:A50 is empty, the whole row is hidden.
However, within that same row, I have with me in columns S30:S32, S33:S35 up to S41 merged cells. The problem is when the cells A30:A50 are empty, the whole row is hidden (which is what I desired) but it also hides the texts within S30:S41...

I was thinking if there was any way that if these rows within S30:S41 would be hidden due to the function button, that it would automatically merge with S50:S70 so that the texts would still show?