Skip to main content

AccessTr.neT


Excel'de Hücre Değerine Göre Renklendirmek

Excel'de Hücre Değerine Göre Renklendirmek

#5
Private Sub CommandButton1_Click()

Dim son As Long, i As Byte, say As Byte, x As Long

With ThisWorkbook.Sheets("Sayfa1")
    son = .Cells(Rows.Count, 1).End(3).Row
    If son < 2 Then Exit Sub
    .Range("H2:H" & Rows.Count).Clear
    .Range("B2:F" & son).Interior.ColorIndex = xlColorIndexNone
    For x = 2 To son
        say = 0
        If Trim(.Cells(x, 1).Value) <> "" Then
            For i = 2 To 6
                If .Cells(x, i).Value >= 6 And .Cells(x, i).Value < 11 Then
                    .Cells(x, i).Interior.Color = vbGreen: say = say + 1
                End If
            Next
            .Cells(x, "H").Value = say
        End If
    Next
End With
End Sub
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
Re: Excel'de Hücre Değerine Göre Renklendirmek - Yazar: feraz - 29/10/2021, 20:43
Task