Hi I am new to programming and just started learning VBA for excel. I have a query regarding sorting of arrays. How do I sort an array containing dates? For example if I hav
This might help. fell free to ask a follow up question.
Sub Sort()
Dim x As Long, y As Long, z As Long
For x = Application.WorksheetFunction.Min(Columns("M")) To Application.WorksheetFunction.Max(Columns("M"))
For y = 1 To Worksheets("Users Info").Cells(Rows.Count, 13).End(xlUp).Row
If Worksheets("Users Info").Cells(y, 13).Value = i Then
z = z + 1
Worksheets("Users Info").Cells(z, 14).Value = i
End If
Next y
Next x
End Sub