
You can “Sorting an array“!

Use the following Worksheet function:
SORT Function



You can use “SORT Function” only in Office365.
VBA Code
As an example, Sorting an array.
Option Explicit
Sub sample()
Dim arr As Variant
Dim arrSort As Variant
Dim item As Variant
'Create array
arr = Array(50, 2, 34, 100, 60)
'Sorting an Array
arrSort = WorksheetFunction.Sort(arr, 1, 1, True)
For Each item In arrSort
'Output to "immediate window"
Debug.Print item
Next
End Sub
Result
You was able to “Sorting an array“!

FYI No.1
Also, you can “Remove duplicates from an array“!
For more information, see the following article:
FYI No.2
For more information about following, see the following official online manual:
●SORT Function