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

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

قام بنشر

جرب هذا الملف

الماكرو

Option Explicit
Sub del_row()
    Dim i%, k%
    Dim st$: st = "حذف"
    Dim Main As Worksheet: Set Main = Sheets("البيانات")
    Dim Source As Worksheet: Set Source = Sheets("المحذوف")
    Dim lrB%
    If ActiveSheet.Name <> Main.Name Then Exit Sub
    
k = Main.Range("a1").CurrentRegion.Rows.Count
 For i = 2 To k
    lrB = Source.Cells(Rows.Count, 1).End(3).Row + 1
    If i > k Then Exit For
       If Main.Cells(i, 5) = st Then
           Source.Cells(lrB, 1).Resize(1, 5).Value = _
           Main.Cells(i, 1).Resize(1, 5).Value
           Cells(i, 1).EntireRow.Delete: i = i - 1: k = k - 1
       End If
  Next
End Sub

الملف مرفق

 

ترحيل و حذف salim.xlsm

  • 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