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

نسخ خلايا بناءا على شرط معين


إذهب إلى أفضل إجابة Solved by محي الدين ابو البشر,

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

تفضل 

Sub Copying_yellow_cells()
  Dim i As Long, j As Long
  For i = 5 To Range("f" & Rows.Count).End(xlUp).Row
    For j = 1 To Columns("H").Column
      If Cells(i, j).DisplayFormat.Interior.Color = vbYellow Then
        Cells(i, "H").Value = Cells(i, j).Value
        Exit For
      End If
    Next
  Next
End Sub

 

نسخ الخلايا الملونة في العمود B.xlsm

تم تعديل بواسطه كمال على طارق
  • Like 2
رابط هذا التعليق
شارك

بارك الله فيك أخي الكريم  ك .... هل يمكن ترتيب النسخ تواليا اي بخلاف نسخ المتقابل... وشكرا  

مثال 

 

1.png

تم تعديل بواسطه khadouma
رابط هذا التعليق
شارك

  • أفضل إجابة

حسب الصورة

عسى

Sub Test()
  Dim i&
  For i = 2 To Range("A" & Rows.Count).End(xlUp).Row
      If Cells(i, 1).Interior.Color = vbYellow Then Cells(Range("B" & Rows.Count).End(xlUp).Row + 1, 2).Value = Cells(i, 1).Value
    Next
End Sub

 

Book1.xlsm

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

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