Soru Değeri Tespit Edip Sildirme

Katılım
18 Ağustos 2009
Mesajlar
752
Excel Vers. ve Dili
Office Ev ve İş 2021 - Türkçe
Altın Üyelik Bitiş Tarihi
12-12-2024
Sorum ektedir arkadaşlar..
 

Ekli dosyalar

YUSUF44

Destek Ekibi
Destek Ekibi
Katılım
4 Ocak 2006
Mesajlar
12,067
Excel Vers. ve Dili
İş : Ofis 365 - Türkçe
Ev: Ofis 365 - Türkçe
Aşağıdaki makro istediğinizi yapıyor ancak örnek dosyanızda D5, D6, D7 hücreleri 3 hücre arka arkaya olduğundan sonuç hatalı olabilir:

PHP:
Sub temizle()
sonB = Cells(Rows.Count, "B").End(3).Row
sonC = Cells(Rows.Count, "C").End(3).Row
sonD = Cells(Rows.Count, "D").End(3).Row
son = WorksheetFunction.Max(sonB, sonC, sonD)
Range("B4:D" & son).SpecialCells(xlCellTypeConstants, 23).Select
For Each hucre In Selection
    If hucre.Offset(1, 0) <> "" Then
        If hucre > hucre.Offset(1, 0) Then
            hucre.ClearContents
        ElseIf hucre < hucre.Offset(1, 0) Then
            hucre.Offset(1, 0).ClearContents
        End If
    End If
Next
End Sub
 
Üst