I have the table in excel with some claims (one line is one claim) where the cells in column A are filled with green colour when the claim was done if not the cell is yellow. In column C, there are the dates of receive the claim. What I need is to hide rows (claims), where in column A is green colour but I don´t wanna hide any rows in actual month. There are 2 conditions: 1) Don´t hide anything from actual month 2) Hide remaining rows where are cells in column A filled with green colour. I solved how to hide rows with green colour but I don´t know how to add to this macro the conditons that the month shouldn´t be actual. . . .
For hiding I´m using this code:
Sub hide_green() Dim Rng As Range Dim MyCell As Range Set Rng = Range("A2:A36635") For Each MyCell In Rng If MyCell.Interior.ColorIndex = 50 Then MyCell.EntireRow.Hidden = True End If Next MyCell End Sub
Thank you very much for your help. I uploaded excel file.