You have several With.Selection.Interior lines that have no End With. I would start there and see if that resolves your issue. I suspect that when you replaced your lines of code, you may have inadvertently removed them.

Additionally, if you wish for your code to run more efficiently, you may want to combine lines of code.

for example, lines like this

Columns("E:Q").Select
    Selection.EntireColumn.Hidden = False
could be replaced with
Columns("E:Q").EntireColumn.Hidden = False
and lines like this:
    Range("Q8").Select
    ActiveCell.FormulaR1C1 = "=RC[-8]"
could be replaced with
    Range("Q8").FormulaR1C1 = "=RC[-8]"
It will take a bit of work to do this, but it will make your code shorter and faster.

Alan