This is what the code supplied by me in post#2 and by Rick in post#3 does.
This is what you initially asked for & then reiterated in the first quote above.
If you want some rows to remain hidden & others to become visible, we will need exact rules as to what to hide & what not to hide.