Daha evvel sormuştum.Cevabı da gelmişti ama sütun sayıları değişti kodları uyarlayamadım.Ekteki excel dosyasında AL VE AN sütunlarındaki 0 ve altındaki değerleri silmek istiyorum.Ekteki kodlarla beceremedim sütun adlarını değiştirdiğimde sadece bir sütunda başarılı olabiliyorum.Diğer sütun da ise sadece sütunun ilk değerinde eksi veya sıfır varsa siliyor.Kodu aşağıda ekliyorum yardımcı olursanız sevinirim.
Dim cll As Range
Dim LR As Long
LR = Cells.Find("*", Range("A1"), , , xlByRows, xlPrevious).Row
For Each cll In Range("AN5:AN" & LR)
If Not cll.HasFormula Then
If cll.Value <= 0 Then
cll.ClearContents
End If
End If
Next
For Each cll In Range("AL5:AL" & LR)
If Not cll.HasFormula Then
If cll.Value <= 0 Then
cll.ClearContents
End If
End If
Next
Dim cll As Range
Dim LR As Long
LR = Cells.Find("*", Range("A1"), , , xlByRows, xlPrevious).Row
For Each cll In Range("AN5:AN" & LR)
If Not cll.HasFormula Then
If cll.Value <= 0 Then
cll.ClearContents
End If
End If
Next
For Each cll In Range("AL5:AL" & LR)
If Not cll.HasFormula Then
If cll.Value <= 0 Then
cll.ClearContents
End If
End If
Next
