• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

Satır renklendirmede kopyalama sorunu

Katılım
20 Ekim 2005
Mesajlar
301
Excel Vers. ve Dili
excel 2010 Türkçe
Arkadaşlar satır renklendirmede aşağıdaki kodu kullanıyorum.Sayfam çok renkli ve farklı renkteki hücrelere gelince satır rengide değişiyor.Bunu tekrenk sarı yapabilirmiyiz. Ve hücreleri kopyalama yapıştırma işlemi yapamıyorum . Aynı anda birden fazla hücre seçmem gerekebiliyor . Dosyamı ekliyorum

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim ColorIndx As Integer
On Error Resume Next
ColorIndx = Target.Interior.ColorIndex
ColorIndx = IIf(ColorIndx < 0, 6, ColorIndx + 1)
Cells.FormatConditions.Delete
With ActiveCell.EntireRow
.FormatConditions.Add Type:=2, Formula1:=1
.FormatConditions(1).Interior.ColorIndex = ColorIndx
End With
End Sub
 

Ekli dosyalar

Merhaba,

Aşağıdaki şekilde denermisiniz.

Kod:
Option Explicit
 
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Application.CutCopyMode = xlCopy Then Exit Sub
    If Application.CutCopyMode = xlCut Then Exit Sub
    
    On Error Resume Next
    
    Cells.FormatConditions.Delete
    
    With ActiveCell.EntireRow
        .FormatConditions.Add Type:=2, Formula1:=1
        .FormatConditions(1).Interior.ColorIndex = 6
    End With
End Sub
 
Geri
Üst