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

مسح بيانات


إذهب إلى أفضل إجابة Solved by سليم حاصبيا,

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

جرب هذا الكود

Option Explicit
Sub del_data()
Dim Cel_1$, Cel_2$, x%, y%
Cel_1 = Range("B4"): Cel_2 = Range("C4")
x = Cel_1 Like "[A-Za-z]*#*"
y = Cel_2 Like "[A-Za-z]*#*"
If x * y <> 0 Then _
Range(Cel_1 & ":" & Cel_2).Delete Shift:=xlUp

End Sub

 

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

أقصد أن لا أكتب في الخلية النطاق يعني يكون في الكود العمود G  ويكتب في الخلية نطاق الصفوف

مثالا أكتب في الخلية B4 رقم 1 و الخلية C4 رقم 30

فيتم مسح النطاق G1:G30

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

  • أفضل إجابة

تم التعديل

Option Explicit

Sub del_data()
Dim Cel_1, Cel_2, x%, y%
Cel_1 = Range("B4"): Cel_2 = Range("C4")
x = Cel_1 Like "#*"
y = Cel_2 Like "#*"
If x * y <> 0 Then
  Cel_1 = "G" & Cel_1
  Cel_2 = "G" & Cel_2
  Range(Cel_1 & ":" & Cel_2).ClearContents
End If
End Sub

 

  • 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