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

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

قام بنشر

بسم الله

أظن الصورت توضح لكم ما المطلوب

4790745.jpg

نشوف المشترك بالعامودين و نعمل عامود ثالث فيه الكل بس بدون تكرار

عمليا سيقرأ كلّ cell من عامود ويقارنها مع كل العامود الثاني فإن وجدها متكررة محا واحدة وإلا نقله

قام بنشر

المرفقات

Sub زر1_انقر()

Dim x As Long

Dim lastr As Long

Dim col1 As Range

Dim col2 As Range

Dim c1 As Range

Dim c2 As Range

Dim col3 As Range

Dim c3 As Range

lastr = Range("a" & Rows.Count).End(xlUp).Row

x = 1

Set col1 = Range("a2:a" & lastr)

Set col2 = Range("b2:b" & lastr)

Set col3 = Range("c2:c" & lastr)

col3.Cells.ClearContents

For Each c1 In col1

         For Each c2 In col2

                If c1.Value = c2.Value Then

                    col3.Cells(x, 1).Value = c1.Value

                    x = x + 1

                End If

         Next c2

Next c1

Set col1 = Nothing

Set col2 = Nothing

Set col3 = Nothing

End Sub

القيم المشتركة بين عمودين.zip

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