- Katılım
- 18 Kasım 2011
- Mesajlar
- 406
- Excel Vers. ve Dili
- excel 2016 türkçe
A1 ile A10 arasına yazdığım sayıları mesela C4,C7,C10,H5,H8,H10 hücrelerine aynı sayı gelmeyecek şekilde nasıl dağıtabilirim...
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub dağıt()
For Each k In Range("C4, C7, C10, H5, H8, H10")
10:
hücre = WorksheetFunction.RandBetween(1, 10)
Cells(hücre, "A").Select 'bu satır kontrol için
If [C4] = Cells(hücre, "A") Or [C7] = Cells(hücre, "A") Or [C10] = Cells(hücre, "A") _
Or [H5] = Cells(hücre, "A") Or [H8] = Cells(hücre, "A") Or [H10] = Cells(hücre, "A") Then GoTo 10
k = Cells(hücre, "A").Value
Next
End Sub
Sub dağıt()
[B][COLOR="Red"]Dim k As Range[/COLOR][/B]
For Each k In Range("C4, C7, C10, H5, H8, H10")
10:
hücre = WorksheetFunction.RandBetween(1, 10)
Cells(hücre, "A").Select 'bu satır kontrol için
If [C4] = Cells(hücre, "A") Or [C7] = Cells(hücre, "A") Or [C10] = Cells(hücre, "A") _
Or [H5] = Cells(hücre, "A") Or [H8] = Cells(hücre, "A") Or [H10] = Cells(hücre, "A") Then GoTo 10
k = Cells(hücre, "A").Value
Next
End Sub