• Merhaba Ziyaretçi,
    Microsoft 365 Uygulamaları ile ilgili yeni haberler, dikkat çekici konular, ilgi ile takip edeceğiniz yazılar için.

    Abone Olun
  • ESTE - Microsoft Office Eğitimleri

    Yeni yıl Microsoft Office Eğitim planlarınız için bütçenizi oluşturmadan önce ESTE eğitim kalitesi ile tanışın. 🙌
    Kullanıcıların ihtiyacı olan yazılı materyal, dosya ve video kaynağı desteğimiz ile tüm ofis çalışanlarının iş süreçlerini rahatlatacak eğitimler planlayın. 🎯
    Microsoft Office eğitimlerimiz hakkında detaylı bilgi için bize ulaşın.

    👉 Microsoft Office Eğitim Talebi

Yardım yinelenenleri kaldır macrosu

incsoft

Yeni Üye
Katılım
28 Ocak 2019
Mesajlar
234
En iyi yanıt
0
Puanları
18
Yaş
43
Konum
Ankara
Ad Soyad
Ufuk İNCE
Office Vers.
Office 2019 Professional
Daha hızlı çalışan bir macro varmıdır arkadaşlar?



C++:
Sub DelDups_OneList()

    Dim iListCount As Integer

    Dim iCtr As Integer

  

    ' Turn off screen updating to speed up macro.

    Application.ScreenUpdating = False

  

    ' Get count of records to search through.

    iListCount = Sheets("Sheet1").Range("A1:A100").Rows.Count

    Sheets("Sheet1").Range("A1").Select

    ' Loop until end of records.

    Do Until ActiveCell = ""

       ' Loop through records.

       For iCtr = 1 To iListCount

          ' Don't compare against yourself.

          ' To specify a different column, change 1 to the column number.

          If ActiveCell.Row <> Sheets("Sheet1").Cells(iCtr, 1).Row Then

             ' Do comparison of next record.

             If ActiveCell.Value = Sheets("Sheet1").Cells(iCtr, 1).Value Then

                ' If match is true then delete row.

                Sheets("Sheet1").Cells(iCtr, 1).Delete xlShiftUp

                   ' Increment counter to account for deleted row.

                   iCtr = iCtr + 1

             End If

          End If

       Next iCtr

       ' Go to next record.

       ActiveCell.Offset(1, 0).Select

    Loop

    Application.ScreenUpdating = True

    MsgBox "Done!"

    End Sub
 
Moderatör tarafında düzenlendi:

musapekel

Yeni Üye
Katılım
10 Ara 2023
Mesajlar
9
En iyi yanıt
0
Puanları
3
Yaş
24
Konum
istanbul
Ad Soyad
musa pekel
Office Vers.
2016 Tr
Kod:
Sub DelDups_OneList()
    Dim ws As Worksheet
    Dim rng As Range
    Dim cell As Range
    Dim dict As Object
    Dim key As Variant
    
    ' Turn off screen updating to speed up macro.
    Application.ScreenUpdating = False
    
    ' Set worksheet
    Set ws = ThisWorkbook.Sheets("Sheet1")
    
    ' Set range to the column you want to check for duplicates
    Set rng = ws.Range("A1:A" & ws.Cells(ws.Rows.Count, "A").End(xlUp).Row)
    
    ' Create a dictionary to store unique values
    Set dict = CreateObject("Scripting.Dictionary")
    
    ' Loop through cells in the range
    For Each cell In rng
        ' Check if value is already in dictionary
        If Not dict.Exists(cell.Value) Then
            ' If not, add it to the dictionary
            dict.Add cell.Value, 1
        Else
            ' If it's a duplicate, mark for deletion
            cell.EntireRow.Delete
        End If
    Next cell
    
    ' Turn on screen updating
    Application.ScreenUpdating = True
    
    MsgBox "Done!"
End Sub
 
Üst Alt