- Katılım
- 31 Ağustos 2010
- Mesajlar
- 387
- Excel Vers. ve Dili
-
Excel 2007-2010 Eng
Open Office Trk
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub karistir()
Range("G1").Select
ActiveCell.FormulaR1C1 = "=RANDBETWEEN(1,14)"
Selection.AutoFill Destination:=Range("G1:G14")
Range("G1:G14").Select
ActiveWorkbook.Worksheets("Sayfa2").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sayfa2").Sort.SortFields.Add Key:=Range("G1"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Sayfa2").Sort
.SetRange Range("A1:G14")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("G1:G14").ClearContents
End Sub
Sub KarisikSirala()
Dim i As Long, _
Kol As Integer, _
Sat As Long
Kol = Cells(1, Columns.Count).End(1).Column + 1
Sat = Cells(Rows.Count, "A").End(3).Row
Application.ScreenUpdating = False
For i = 1 To Sat
Randomize
Cells(i, Kol) = Rnd
Next i
Range(Cells(1, 1), Cells(Sat, Kol)).Sort Key1:=Cells(1, Kol)
Columns(Kol).Delete
Application.ScreenUpdating = True
End Sub