- Katılım
- 29 Kasım 2011
- Mesajlar
- 16
- Excel Vers. ve Dili
- excel 2002 türkçe
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim S1 As Worksheet, Sayı As Byte, X As Byte
If Intersect(Target, Range("A5:A" & Rows.Count)) Is Nothing Then Exit Sub
If Target.Cells.Count > 1 Then Exit Sub
Set S1 = Sheets("Sayfa1")
X = 2
Range("B" & Target.Row & ":IV" & Target.Row).ClearContents
Randomize Timer
10 Sayı = Int(Rnd() * 100)
If WorksheetFunction.CountIf(S1.Range("B5:F18"), Sayı) > 0 Then
If WorksheetFunction.CountIf(Range("B" & Target.Row & ":IV" & Target.Row), Sayı) > 0 Then GoTo 10
Cells(Target.Row, X) = Sayı
X = X + 1
End If
If (X - 1) <= Target Then GoTo 10
Set S1 = Nothing
End Sub
Sayı = Int(Rnd() * 100)
Sayı As [COLOR=red]Byte[/COLOR]