[COLOR="Navy"]Sub[/COLOR] Random()
Application.ScreenUpdating = False
Sheets("Key").Select
[COLOR="Navy"]Dim[/COLOR] RowNum [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
RowNum = Range("A" & Rows.Count).End(xlUp).Row
[COLOR="Navy"]Dim[/COLOR] RNG1 [COLOR="Navy"]As[/COLOR] Range
[COLOR="Navy"]Set[/COLOR] RNG1 = Range("A2:A" & RowNum)
[COLOR="Navy"]Dim[/COLOR] randomCell1 [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
randomCell1 = Int(Rnd * RNG1.Cells.Count) + 1
[COLOR="Navy"]With[/COLOR] RNG1.Cells(randomCell1)
.Select
Selection.Copy
[COLOR="Navy"]End[/COLOR] With
Sheets("Quiz").Select
Range("H3").Select
Selection.PasteSpecial Paste:=xlPasteValues
'[COLOR="Green"][B]#############[/B][/COLOR]
[COLOR="Navy"]Dim[/COLOR] Rng [COLOR="Navy"]As[/COLOR] Range, Dn [COLOR="Navy"]As[/COLOR] Range, Ac [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] c [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
c = 8
[COLOR="Navy"]With[/COLOR] Sheets("Key")
[COLOR="Navy"]Set[/COLOR] Rng = .Range("B2", .Range("B" & Rows.Count).End(xlUp))
[COLOR="Navy"]End[/COLOR] With
[COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Dn [COLOR="Navy"]In[/COLOR] Rng
[COLOR="Navy"]With[/COLOR] Sheets("Quiz")
Ac = Ac + 1
.Cells(c, Ac) = Dn.Value
[COLOR="Navy"]If[/COLOR] Ac = 15 [COLOR="Navy"]Then[/COLOR]
c = c + 1: Ac = 0
[COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]End[/COLOR] With
[COLOR="Navy"]Next[/COLOR] Dn
[COLOR="Navy"]Dim[/COLOR] n [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] Col [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] Rw [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] fd [COLOR="Navy"]As[/COLOR] Boolean
[COLOR="Navy"]With[/COLOR] CreateObject("scripting.dictionary")
.CompareMode = vbTextCompare
[COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Dn [COLOR="Navy"]In[/COLOR] Rng
fd = False
[COLOR="Navy"]Do[/COLOR] Until fd
Col = Application.RandBetween(1, 15)
Rw = Application.RandBetween(8, 11)
[COLOR="Navy"]If[/COLOR] Not Cells(Rw, Col) = vbNullString [COLOR="Navy"]Then[/COLOR]
[COLOR="Navy"]If[/COLOR] Not .exists(Cells(Rw, Col).Address) [COLOR="Navy"]Then[/COLOR]
.Add (Cells(Rw, Col).Address), Nothing
Cells(Rw, Col) = Dn.Value
fd = True
[COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]Loop[/COLOR]
[COLOR="Navy"]Next[/COLOR] Dn
[COLOR="Navy"]End[/COLOR] With
'[COLOR="Green"][B]############[/B][/COLOR]
Application.ScreenUpdating = True
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]