Sub Macro3()
Dim Rng As Range
Dim randomIdx As Long
' Set your target range
Set Rng = Range("K3:K4591")
' Initialize the random number generator
Randomize
' Generate a random index between 1 and the total number of cells
randomIdx = Int(Rnd * Rng.Cells.Count) + 1
' Select the cell at that index
Rng.Cells(randomIdx).Select
Selection.Copy
End Sub
No comments:
Post a Comment