I have a sheet where I want to select multiple items (ctrl click, not drop down) from column E, and then look at each cell in the neighboring 65 columns for conditional formatting and hide any that do not have active formatting. I have it working if it looks through every cell in the 65 column range, but the real document has 700 rows and locks up when it runs. My thought was to either only look in the rows that offset the selected cells, only look at the visible rows, or fill the selections with color and use those to identify the offset rows/cells I want it to look through.
Whether I use selected cells, formatted cells or hidden rows to identify the corresponding second range to filter columns for, I can�t figure out how to require two if�s and two loops at the same time. In the example attached, running the �Run Both� macro when all selections are made from column E will fill those selected cells with color and then hide the rows that are not shaded. The problem comes when it gets to the second half of the macro, which is hiding any of the 65 columns to the right of the shaded cells that do not have conditional formatting.
Can anyone help me figure out how to tell it to only look at the selected rows (which will differ each time it�s used) and then only look at the corresponding 65 rows when it identifies and hides columns?
**Update*** There were a couple of things I should have mentioned in my original post.
To keep the sub columns together with dates at all times, the area being filtered (Sheet1 of attachment) is not an actual table. and
Some of the cells that I need to keep will be blank with only conditional formatting activated. .
** Updated Attachment
Bookmarks