اذهب الي المحتوي
أوفيسنا

مقارنة اعمدة لغرض التدقيق


nash60

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

السلام عليكم ورحمة الله وبركاته

فضلا لو تكرمتم المساعدة في المقارنة لغرض التدقيق عمودين  في ورقتين  والشرح موضح في المثال المرفق 

شاكر فضل الجميع وجزاكم الله خيرا

المصنف2.rar

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

جرب هذا الكود

Option Explicit
Sub compaire_columns()
Dim sh1 As Worksheet, sh2 As Worksheet
Dim First_rg1 As Range, Sec_rg1 As Range
Dim First_rg2 As Range, Sec_rg2 As Range

Dim m%, i%

Set sh1 = Sheets("بيانات 1"): Set sh2 = Sheets("بيانات2")
sh1.Range("A2").CurrentRegion.Columns(3).Offset(1).Resize(100, 2).Clear
Set First_rg2 = sh2.Range("a2").CurrentRegion.Columns(1)
Set Sec_rg2 = sh2.Range("a2").CurrentRegion.Columns(2)

Set First_rg1 = sh1.Range("a2").CurrentRegion.Columns(1)
Set Sec_rg1 = sh1.Range("a2").CurrentRegion.Columns(2)
For i = 2 To First_rg1.Rows.Count
 If First_rg1.Cells(i) = First_rg2.Cells(i) Then
   First_rg1.Cells(i).Offset(, 2) = "مطابق"
 Else
 First_rg1.Cells(i).Offset(, 2).Interior.ColorIndex = 6
 End If
 Next
 For i = 2 To Sec_rg1.Rows.Count
 If Sec_rg1.Cells(i) = Sec_rg2.Cells(i) Then
  Sec_rg1.Cells(i).Offset(, 2) = "مطابق"
 Else
 Sec_rg1.Cells(i).Offset(, 2).Interior.ColorIndex = 6
  End If
  Next
End Sub

الملف مرفق

 

المصنف2 _سليم.rar

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

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