Biray3550
Altın Üye
- Katılım
- 29 Mayıs 2021
- Mesajlar
- 48
- Excel Vers. ve Dili
- Microsoft Office Professional Plus 2021
- Altın Üyelik Bitiş Tarihi
- 29-05-2026
Merhaba, A Kolonundaki yinelenen değerleri D Kolonundaki veri sıfır ise sıfır olan yinelenen değerlerin olduğu satırı silmeyi nasıl hızlandırabilirim?
Aşağıdaki macro çok yavaş çalışıyor.Veri 150 Bin olduğu için.
Teşekkür ederim.
Sub SilYinelenenVeSifir()
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Dim ws As Worksheet
Dim lastRow As Long
Dim rng As Range
Dim cel As Range
Dim dict As Object
Set ws = ActiveSheet
lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
Set dict = CreateObject("Scripting.Dictionary")
For Each cel In ws.Range("A1:A" & lastRow)
If Not dict.Exists(cel.Value) Then
dict.Add cel.Value, cel.Row
Else
If ws.Cells(cel.Row, "D").Value = 0 Then
ws.Rows(cel.Row).Delete
End If
End If
Next cel
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
Aşağıdaki macro çok yavaş çalışıyor.Veri 150 Bin olduğu için.
Teşekkür ederim.
Sub SilYinelenenVeSifir()
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Dim ws As Worksheet
Dim lastRow As Long
Dim rng As Range
Dim cel As Range
Dim dict As Object
Set ws = ActiveSheet
lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
Set dict = CreateObject("Scripting.Dictionary")
For Each cel In ws.Range("A1:A" & lastRow)
If Not dict.Exists(cel.Value) Then
dict.Add cel.Value, cel.Row
Else
If ws.Cells(cel.Row, "D").Value = 0 Then
ws.Rows(cel.Row).Delete
End If
End If
Next cel
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
Ekli dosyalar
-
2.8 MB Görüntüleme: 8