- Katılım
- 5 Kasım 2007
- Mesajlar
- 4,727
- Excel Vers. ve Dili
- 64 Bit TR - Microsoft Office 365 - Win11 Home
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)
If Intersect(Target, [C8]) Is Nothing Then Exit Sub
If Target = "" Then Exit Sub
Set s2 = Sheets("RENKLER")
son = s2.Cells(Rows.Count, "K").End(3).Row
If WorksheetFunction.CountIf(s2.Range("K2:K" & son), Target) > 0 Then
sıra = WorksheetFunction.Match(Target, s2.Range("K2:K" & son), 0)
Target.Interior.Color = s2.Cells(sıra + 1, "L").Interior.Color
End If
End Sub
Aşağıdaki kodları ilgili sayfanın kod bölümüne yapıştırıp deneyiniz:
Kod:Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, [C8]) Is Nothing Then Exit Sub If Target = "" Then Exit Sub Set s2 = Sheets("RENKLER") son = s2.Cells(Rows.Count, "K").End(3).Row If WorksheetFunction.CountIf(s2.Range("K2:K" & son), Target) > 0 Then sıra = WorksheetFunction.Match(Target, s2.Range("K2:K" & son), 0) Target.Interior.Color = s2.Cells(sıra + 1, "L").Interior.Color End If End Sub