Try this Note you said 2 - x and 4-x change low_range to suit

Dim lngRand As Long ' declare outside sub

Sub makernd()
Dim high_range As Long
Dim low_range As Long
low_range = 2
high_range = ActivePresentation.Slides.Count
Randomize
lngRand = Int((high_range - (low_range - 1)) * Rnd) + low_range
End Sub
Sorry posted twice slip of finger!