After made a filter selection, hide to select visible rows basedon the registration in the visible cell related to the visible row above
Yes, super !! (And a HappyNewYear to you and all other users !),
Can you please make an update to select <"data-B" on another way.
Actual it is:
If .Cells(varRows(n), "N") = "x" And .Cells(varRows(n + 1), "N") < "data-B" Then
It should be nice if the part "data-B" can refer to 'Sheet2, ColumnA' where standing a few keywords in A2, A3, A4, etc..
For the part < it should look in those sheet/column and only fullfill the code for HideRow if the text in column N isn't in Sheet2/ColumnA.
On this way it make it flexible to hide rows based on several written codes in the other sheet.
You get then something like;
If .Cells(varRows(n), "N") = "x" And .Cells(varRows(n + 1), "N") < [data in sheet2 columnA] Then....
regards, Johan
|