أخى الفاضل / فراسكو
جرب المرفق
اكتب كلمة من الكلمات المقصودة فى العمود E ليتم المطلوب
هذا كود فى حدث الورقة
Private Sub Worksheet_Change(ByVal Target As Range)
Set sh = Sheets("ورقة2")
LR = sh.Cells(Rows.Count, 1).End(xlUp).Row + 1
If Target.Count > 1 Then Exit Sub
Application.ScreenUpdating = False
If Not Intersect(Target, Range("E:E")) Is Nothing Then
If Not IsEmpty(Target) And Target.Text = "صادر" Or Target.Text = "فوق" Or Target.Text = "وارد" Or Target.Text = "اسفل" Then
x = Target.Row
Target.Offset(0, -4).Resize(1, 5).Copy
sh.Range("A" & LR).PasteSpecial xlPasteValues
Rows(x).EntireRow.Delete shift:=xlUp
sh.Cells(LR, 1).Value = sh.Cells(LR, 1).Row - 1
LR1 = Cells(Rows.Count, 1).End(xlUp).Row
Application.EnableEvents = False
For i = 2 To LR1
Cells(i, 1) = Cells(i, 1).Row - 1
Next
Application.EnableEvents = True
End If
End If
Application.CutCopyMode = False
Application.ScreenUpdating = True
Set sh = Nothing
End Sub
New Microsoft Excel Worksheet1.rar