اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

مسح محتوى الخلايا المكررة بدون حذف الخلايا نفسها


mhareek
إذهب إلى أفضل إجابة Solved by lionheart,

الردود الموصى بها

السلام عليكم اخوانى الاحباب عندى كمية مدخلات كبيرة جدا   حولى 100 الف رقم     واريد استخراج المكرر   ولاكن لا اريد ان احذف الخانة المكررة اريد فقط ان امسح بيناتها  وتكون موجودة بس فارغه وبالتالى لا تكون هناك بينات مكرر   وفى نفس الوقت محتفظ بترتيب 

هذا المثال المرفق     اريد     الخنات   المعلمة بللون الاحمر      تتمسح منهم واحد    الوثانية تبقى بدون مسح

عنوان مخالف ... تـــم تعديل وتغيير عنوان المشاركة ليعبر عن طلبك.. كما تم تعديل رفع الملف بدون ضغط , طالما حجمه صغير وتم رفع الملف بإمتداد XLSM لأن طلبك لا يمكن حله الا بالأكواد

مثال.xlsm

رابط هذا التعليق
شارك

وعليكم السلام-يمكنك استخدام هذا الكود

Sub RmDupsU()
    Dim U As Range, N As Long, i As Long, wf As WorksheetFunction
    Dim rUP As Range

    Set U = Range("A:A")
    Set wf = Application.WorksheetFunction

    N = Cells(Rows.Count, "A").End(xlUp).Row

    For i = N To 2 Step -1
        Set rUP = Range(Cells(i - 1, "A"), Cells(1, "A"))
        If wf.CountIf(rUP, Cells(i, "A").Value) > 0 Then Cells(i, "A").Clear
    Next i
End Sub

Duplicate Clear Contents.xlsm

  • Like 6
رابط هذا التعليق
شارك

  • أفضل إجابة
Sub Test()
    Dim a, dic As Object, i As Long
    Set dic = CreateObject("Scripting.Dictionary")
    a = Range("A1:A" & Cells(Rows.Count, 1).End(xlUp).Row).Value
    For i = LBound(a) To UBound(a)
        If dic.Exists(a(i, 1)) Then a(i, 1) = Empty Else dic.Add a(i, 1), 1
    Next i
    Range("A1").Resize(UBound(a, 1), UBound(a, 2)).Value = a
End Sub

 

  • Like 3
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information