Hi Johan,
Am Sat, 6 Jul 2019 09:38:52 -0700 (PDT) schrieb
JS SL:
After run the macro all the columns F till BZ are hidden :)
But... There are only a few cells in the range 'F3 till BZ last row' with a collored cell. The macro hides them all.
Only the columns without any colored cell in one of the rows of that specific column should be set on hide (hide if at least one of the cells in all the used rows has a fill color).
sorry, I misunderstood your question.
Change the lower part of the code in this way:
For j = 78 To 6 Step -1
Counter = 0
For i = 3 To LRow
If .Cells(i, j).Interior.Pattern < xlNone Then
Exit For
Else
Counter = Counter + 1
End If
Next
If Counter = LRow - 2 Then Columns(j).Hidden = True
Next
Regards
Claus B.
--
Windows10
Office 2016