• DİKKAT

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

56 Koşullu Biçimlendirmede Sorun

Katılım
5 Nisan 2009
Mesajlar
533
Excel Vers. ve Dili
2003-2007
Değerli arkadaşlar,
Aşağıdaki kodları uygulayarak koşullu biçimlendirme yapmak istiyorum.AYDIN ve İLÇELERİ ayrı bir biçim,DENİZLİ ve İLÇELERİ ayrı bir biçim,MUĞLA VE İLÇELERİ ayrı bir biçim ANKARA ve İLÇELERİ(SADECE ÇANKAYA) ayrı bir biçimde ve renkte olmalı.Uygulamada bu eksik gerçekleşiyor.Örneğin MUĞLA ve İLÇELERİNDEN birisini yazdırdığımda olması gereken biçimde değil de başka bir ilin renk ve deseninde yazılabiliyor.Bu hepsi için geçerli değil.Örneğin 10 tanede 2 tane olabiliyor.Bu sorunu aşmama yardımcı olmanızı rica ediyorum.Saygılarımla...

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
If Target.Cells.Count > 1 Then Exit Sub
On Error GoTo ws_exit:
Set rng = Application.Intersect(Target, Me.Range("I3:J5000"))

If rng Is Nothing Then Exit Sub
With Target
Select Case UCase(.Value)

Case Is = "MİLAS": .Interior.ColorIndex = 10
Case Is = "FETHİYE": .Interior.ColorIndex = 10
Case Is = "KÖYCEĞİZ": .Interior.ColorIndex = 10
Case Is = "BODRUM", "MUĞLA": .Interior.ColorIndex = 10
Case Is = "DALAMAN": .Interior.ColorIndex = 10
Case Is = "ORTACA": .Interior.ColorIndex = 10
Case Is = "MARMARİS": .Interior.ColorIndex = 10
Case Is = "ULA": .Interior.ColorIndex = 10
Case Is = "YATAĞAN": .Interior.ColorIndex = 10
Case Is = "DATÇA": .Interior.ColorIndex = 10
Case Is = "GERMENCİK", "AYDIN": .Interior.ColorIndex = 3
Case Is = "İNCİRLİOVA": .Interior.ColorIndex = 3
Case Is = "SÖKE": .Interior.ColorIndex = 3
Case Is = "İNCİRLİOVA": .Interior.ColorIndex = 3
Case Is = "KOÇARLI": .Interior.ColorIndex = 3
Case Is = "YENİPAZAR": .Interior.ColorIndex = 3
Case Is = "KARPUZLU": .Interior.ColorIndex = 3
Case Is = "KUŞADASI": .Interior.ColorIndex = 3
Case Is = "KÖŞK": .Interior.ColorIndex = 3
Case Is = "SULTANHİSAR": .Interior.ColorIndex = 3
Case Is = "NAZİLLİ": .Interior.ColorIndex = 3
Case Is = "BOZDOĞAN": .Interior.ColorIndex = 3
Case Is = "KUYUCAK": .Interior.ColorIndex = 3
Case Is = "BUHARKENT": .Interior.ColorIndex = 3
Case Is = "KARACASU": .Interior.ColorIndex = 3
Case Is = "ÇİNE": .Interior.ColorIndex = 3
Case Is = "MERKEZ": .Interior.ColorIndex = 1
Case Is = "ACIPAYAM", "DENİZLİ": .Interior.ColorIndex = 32
Case Is = "SERİNHİSAR": .Interior.ColorIndex = 32
Case Is = "TAVAS": .Interior.ColorIndex = 32
Case Is = "KALE": .Interior.ColorIndex = 32
Case Is = "HONAZ": .Interior.ColorIndex = 32
Case Is = "SARAYKÖY": .Interior.ColorIndex = 32
Case Is = "BABADAĞ": .Interior.ColorIndex = 32
Case Is = "BEYAĞAÇ": .Interior.ColorIndex = 32
Case Is = "ÇARDAK": .Interior.ColorIndex = 32
Case Is = "BOZKURT": .Interior.ColorIndex = 32
Case Is = "AKKÖY": .Interior.ColorIndex = 32
Case Is = "ÇİVRİL": .Interior.ColorIndex = 32
Case Is = "ÇAL": .Interior.ColorIndex = 32
Case Is = "BEKİLLİ": .Interior.ColorIndex = 32
Case Is = "BAKLAN": .Interior.ColorIndex = 32
Case Is = "ÇAMELİ": .Interior.ColorIndex = 32
Case Is = "GÜNEY": .Interior.ColorIndex = 32
Case Is = "BULDAN": .Interior.ColorIndex = 32
Case Is = "ÇANKAYA": .Interior.ColorIndex = 22
Case Is = "ANKARA": .Interior.ColorIndex = 22
Case Is = "DİDİM": .Interior.ColorIndex = 3
Case Is = "KAVAKLIDERE": .Interior.ColorIndex = 10
Case Else
.Interior.ColorIndex = xlNone
End Select
End With

ws_exit:
End Sub
 

Ekli dosyalar

Merhaba,

Kod:
Select Case UCase(.Value)

yerine aşağıdaki gibi yazarak denermisiniz..

Kod:
Select Case UCase(Replace(Replace(.Value, "i", "İ"), "ı", "I"))

.
 
Geri
Üst