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

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

قام بنشر

مع ملاحظة أن

السطرين

myrows = 20

mycols = 5

لتحديد مجال البحث ، و اذا اردت البحث بدءا من الخلية الفعالية الي آخر الشيت فأزل السطران

Sub FindFirstEmpty()

'

'

Application.ScreenUpdating = False

Cells.Select

  

  myrows = Selection.Rows.Count

  mycols = Selection.Columns.Count

  

  myrows = 20

  mycols = 5

  

  origraw = myrows

  

ActiveCell.Select

For i = 0 To myrows - 1

   For j = 0 To mycols - 1

     If ActiveCell.Offset(i, j).FormulaR1C1 <> "" Then

       GoTo newrow

     End If

      

     

   Next

    MsgBox "Founf the Fist Empty Row "

       ActiveCell.Offset(i, j).Activate

       ActiveCell.EntireRow.Select

    Exit Sub

       

       

' ActiveCell.Offset(1, 0).Activate

    '  myrows = myrows - 1

newrow:


   Application.StatusBar = " checking ...." & _

   Format(i / origraw, "0.0%") & "       Please Wait......."

   

Next i


    Application.ScreenUpdating = True

    Application.StatusBar = False

End Sub

FindFirstEmpty.zip

  • 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