- Katılım
- 24 Aralık 2010
- Mesajlar
- 79
- Excel Vers. ve Dili
- 2003
Merhaba arkadaşlar; Aşağıdaki kod A1'den başlamak kaydıyla sırayla B1,C1...vb. 10 tane birbirinden farklı rastgele sayılar üretiyor.
Bunu A5'ten başlamak kaydıyla nasıl yapabiliriz?
SÜTUN = [IV1].End(1).Column
If SÜTUN = 10 Then Exit Sub
BAŞLA:
sayi = Int((10 * Rnd) + 1)
If WorksheetFunction.CountIf(Range(Cells(1, 1), Cells(1, SÜTUN + 1)), sayi) > 0 Or sayi = 0 Then GoTo BAŞLA
If Cells(1, SÜTUN) <> "" Then
Cells(1, SÜTUN + 1) = sayi
Else
Cells(1, SÜTUN) = sayi
End If
Bunu A5'ten başlamak kaydıyla nasıl yapabiliriz?
SÜTUN = [IV1].End(1).Column
If SÜTUN = 10 Then Exit Sub
BAŞLA:
sayi = Int((10 * Rnd) + 1)
If WorksheetFunction.CountIf(Range(Cells(1, 1), Cells(1, SÜTUN + 1)), sayi) > 0 Or sayi = 0 Then GoTo BAŞLA
If Cells(1, SÜTUN) <> "" Then
Cells(1, SÜTUN + 1) = sayi
Else
Cells(1, SÜTUN) = sayi
End If
Son düzenleme:
