DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub Worksheet_Change(ByVal Target As Range)
Dim RefCells As Range
Dim c As Range, r As Range
Dim sRow As Long
If Intersect(Target, Me.Range("C4:C" & Me.Rows.Count)) Is Nothing Then Exit Sub
Application.EnableEvents = False
Set RefCells = Me.Range("G2,I2,L2,O2")
For Each c In Intersect(Target, Me.Range("C4:C" & Me.Rows.Count))
sRow = c.Row
Me.Cells(sRow, "D").Interior.Pattern = xlNone
If CleanCode(c.Value) <> "" Then
For Each r In RefCells
If CleanCode(c.Value) = CleanCode(r.Value) Then
Me.Cells(sRow, "D").Interior.Color = r.Interior.Color
Exit For
End If
Next r
End If
Next c
Application.EnableEvents = True
End Sub
Private Function CleanCode(ByVal txt As String) As String
Dim i As Long, ch As String
txt = UCase(txt)
For i = 1 To Len(txt)
ch = Mid(txt, i, 1)
If ch Like "[A-Z0-9]" Then CleanCode = CleanCode & ch
Next i
End Function