Public Sub Randomize()
Dim MaxRows As Integer

' Our column to randomize is column "B".
' We have headers so we start on row 2

' Change the "B2" below to represent your desired column and starting row

MaxRows = Range("B2").End(xlDown).Row

LowerBoundary = 1

' We use column "E" to hold our randomly generated number
' We start on row 2 as our data contains headers in row 1

Set OurRange = Range("E2", Range("E" & MaxRows))
OurRange.Clear
If MaxRows > MaxRows - LowerBoundary + 1 Then
    MsgBox ("Number of cells > number of unique random numbers")
    Exit Sub
End If
For Each Rng In OurRange
    RandomNumber = Int((MaxRows - LowerBoundary + 1) * Rnd + LowerBoundary)
    Do While Application.WorksheetFunction.CountIf(OurRange, RandomNumber) >= 1
        RandomNumber = Int((MaxRows - LowerBoundary + 1) * Rnd + LowerBoundary)
    Loop
Rng.Value = RandomNumber
Next

' Now sort the data by the random number values in ascending order
' Notice that we sort column A-E

Range("A2", Range("E" & MaxRows)).Sort Key1:=Range("E" & MaxRows), Order1:=xlAscending

' Optionally you can now clear column E (or whatever column choose to
' hold the random numbers.

Columns("E").EntireColumn.Clear
End Sub
