Belli bir kolondaki veriler eğer birbirinin aynısı ise o satırı silsin istiyorum. Ancak hangi kolona bakması gerektiğini ben belirlemek istiyorum. Aşağıdaki kodlarda aşağıdaki satırda nasıl bir değişiklik yapmalıyım.
If WorksheetFunction.CountIf(Range("A1:A" & sil), Range("A" & sil)) > 1 Then Rows(sil).Delete
Sub mukererleri_sil()
Dim X As Integer
On Error Resume Next
With Application
.ReferenceStyle = xlR1C1
End With
X = InputBox(" Silinecek olan Mükerrer(Aynı olan) kayıtlarınız kaçıncı kolonda ?")
With Application
.ReferenceStyle = xlA1
End With
For sil = Cells(65536, X).End(xlUp).Row To 1 Step -1
If WorksheetFunction.CountIf(Range("A1:A" & sil), Range("A" & sil)) > 1 Then Rows(sil).Delete
Next
End Sub
If WorksheetFunction.CountIf(Range("A1:A" & sil), Range("A" & sil)) > 1 Then Rows(sil).Delete
Sub mukererleri_sil()
Dim X As Integer
On Error Resume Next
With Application
.ReferenceStyle = xlR1C1
End With
X = InputBox(" Silinecek olan Mükerrer(Aynı olan) kayıtlarınız kaçıncı kolonda ?")
With Application
.ReferenceStyle = xlA1
End With
For sil = Cells(65536, X).End(xlUp).Row To 1 Step -1
If WorksheetFunction.CountIf(Range("A1:A" & sil), Range("A" & sil)) > 1 Then Rows(sil).Delete
Next
End Sub
