- Katılım
- 29 Nisan 2009
- Mesajlar
- 5
- Excel Vers. ve Dili
- 2007
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub rastgele_59()
Dim col As Collection, hcr As Range
Randomize Timer
Range("L3:Q3").Value = ""
Set col = New Collection
For Each hcr In Range("C2:H" & Cells(65536, "B").End(xlUp).Row)
col.Add hcr.Value
Next
For i = 1 To 6
bu_var:
sayi = Int(Rnd() * col.Count) + 1
If WorksheetFunction.CountIf(Range("L3:Q3"), col(sayi)) > 0 Then GoTo bu_var
Cells(3, i + 11).Value = col(sayi)
Next
Range("L3:Q3").Sort Key1:=Range("L3"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight, _
DataOption1:=xlSortNormal
MsgBox "İşlem Tamamlandı." & vbLf & "evrengizlen", vbOKOnly + vbInformation, "E V R E N"
End Sub