اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

حذف سطور بشرطين


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

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

السلام عليكم

لدي كود vb يعمل على حذف السطور التي يتجاوز التاريح في العمود D 45 يوما و أريد تعديله بإضافة شرط آخر و هو أن يكون العمود H  فارغا حتى يقوم بحذف السطر و شكرا.

Sub DelRows()
Dim x As Integer, I As Long, y As Long
y = Feuil1.Range("D" & Rows.Count).End(xlUp).Row
For I = y To 2 Step -1
x = WorksheetFunction.Days360(Cells(I, "D"), Date)
If x > 45 Then
Cells(I, "A").EntireRow.Delete
End If
Next
End Sub

 

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

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