I have a list of cells that I want to randomly select from by clicking a button with no repeats, and display the value in another cell. After a certain point I want to be able to "reset" so that all of the cells are eligible to be chosen, weather that's after 2 random selections or after 50.
I already have a macro to randomly select a cell and display that cell's value somewhere else (see below).
Sub MGen()
Dim ws As Worksheet
Dim stRow As Long, endRow As Long, dataCol As Long
Dim dispRow As Long, dispCol As Long
Set ws = Sheets("MHome")
stRow = 2
dataCol = 1
dispRow = 3
dispCol = 4
With ws
endRow = .Cells(.Rows.Count, dataCol).End(xlUp).Row
.Cells(dispRow, dispCol).Value = _
.Cells(Application.RandBetween(stRow, endRow), dataCol).Value
End With
End Sub
With altering this macro for no repeats, do I need another macro for the "reset"?