Don't hide row with at least one cell with color

  • Dear Gurus,


    I tried the VBA to hide the row if the range of cells e.g: C2:E2 are blank and the macro hide all rows if they find the conta of cells = 0 . But the issue that I want to keep those row that is blank but have at least one cell with color in back groud + comment.
    1- Can I do that in VBA?
    2- Can I check the empty range instead of counta cells in above condition for hide the rows?


    Best regards,
    TQV

  • Re: Don't hide row with at least one cell with color



    Only hides if your COUNTA cell reports 0 and if there are no colored cells in the cells to the right.


    Note that I changed the variable definations... i refers to a column, j refers to a row.


    Experts: how do you do this using a range rather than using the Cells(j,i) method?

  • Re: Don't hide row with at least one cell with color


    Dear Joebbshop ,


    It work well. Thanks you. And Yes can we manage this by range?


    Best regards,
    TQV

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!