سلام عليكم
ارجو من الاخوة الافاضل الإفادة عن طريقة حذف الخلايا التي تحتوى على كلمات معينة من منطقة يتم تحديدها مسبقا - وليس من كل ورقة العمل
حيث قام الاستاذ الفاضل طارق محمود
بعمل كود - لاكن يقوم بحذف البيانات من الورقة كاملة وليس المنطقة المحددة مسبقا.
كما ظهرت مشكلة اللغة العربية - عند البحث عن بيانات باللغة العربية لا يتعرف عليها - فقط يتعرف على بيانات اللغة الانجليزية
هذا الكود
() Sub deletX
Dim x As String, y As Long
d = WorksheetFunction.Find("a", "Tarek")
x = InputBox("What is the word you want to delete Cells contain it?")
If x <> "" Then GoTo 10
y = InputBox("What is the Value you want to delete Cells contain it?")
For Each ce In Range("A1", Cells.SpecialCells(xlLastCell))
If ce.Value = y Then ce.ClearContents
Next ce
Exit Sub
10
For Each ce In Range("A1", Cells.SpecialCells(xlLastCell))
On Error Resume Next
If Len(ce) < Len(x) Then GoTo 20
aa = WorksheetFunction.Find(x, ce)
If aa > 0 Then ce.ClearContents
20
aa = 0
Next ce
End Sub
Delete_Fixed_Cells.xls