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

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

قام بنشر
Sub RandomNames_Salim()
    Const startRow As Byte = 2
    Const endRow As Byte = 31
    Dim g(startRow To endRow), c As Integer, r As Integer

    Do
        c = Application.RandBetween(startRow, endRow)
        
        If Not g(c) Then
            r = r + 1
            Cells(r + 1, "D").Value = Cells(c, "A").Value
            g(c) = True
        End If
    Loop Until r = 30
End Sub

 

  • Like 1
  • 4 weeks later...

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