Consulting

Results 1 to 2 of 2

Thread: Modify conditional formatting in multiple cells

  1. #1
    VBAX Newbie
    Joined
    Jun 2017
    Posts
    2
    Location

    Modify conditional formatting in multiple cells

    Hi -

    I have several similar worksheets in which I want to change all of the cell colors that are the dark green to the lighter green (visible in other parts of the worksheet) in order to make them easier to read. The problem is that the cell colors are set by conditional formatting. I seem to be only able to make this modification one cell at a time, or sometimes one column, at a time. In some parts of the page I'm not even able to highlight multiple rows or columns. If I select the whole worksheet, the conditional formatting does not show.

    I'm attaching one of the workbooks so as to make more clear what my problem is. All I want to know is how to change that darker green to the lighter green without losing any other formatting, values, or content.

    Any help in showing me how to do this will be greatly appreciated.

    Thanks, Jack
    Attached Files Attached Files

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Dim i As Long
    
        With ActiveSheet.Range("C4:K34")
        
            For i = .FormatConditions.Count To 1 Step -1
            
                .FormatConditions(i).Delete
            Next i
            
            .FormatConditions.Add xlCellValue, xlBetween, 1, 110
            .FormatConditions(.FormatConditions.Count).Interior.Color = RGB(0, 255, 0)
        
            .FormatConditions.Add xlCellValue, xlBetween, -1, -110
            .FormatConditions(.FormatConditions.Count).Interior.Color = RGB(255, 0, 0)
            
            .FormatConditions.Add xlCellValue, xlBetween, "INT", "INT ZZZ"
            .FormatConditions(.FormatConditions.Count).Interior.Color = RGB(255, 0, 0)
        End With
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •