Steve_nyc92
New Member
- Joined
- Dec 17, 2020
- Messages
- 23
- Office Version
- 2016
- Platform
- Windows
Hi
I have this code below where it picks a random name from a list (3, 285) and puts it in cell E22 (22, 5). I would like to update it so it loops when I hit the button so it shows 4-5 names before stopping on the 5th name. Is there a way to do this? Thanks in advance
End Sub
I have this code below where it picks a random name from a list (3, 285) and puts it in cell E22 (22, 5). I would like to update it so it loops when I hit the button so it shows 4-5 names before stopping on the 5th name. Is there a way to do this? Thanks in advance
VBA Code:
Sub Oval1_Click()
Dim rw As Long
rw = [RandBetween(3,285)]
Cells(22, 5) = Cells(rw, 25)
End Sub