Eu insiro os dados através de um formulário e não está classificando.
Tenho uma macro que classifica apenas uma coluna, se classificar por data a hora fica bagunçada e vice-versa.
Sub ClassificarData()
reglinha = Worksheets("shtAgenda").UsedRange.Rows.Count
Range("A2:E5001").Select
ActiveWorkbook.Worksheets("shtAgenda").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("shtAgenda").Sort.SortFields.Add Key:=Range("C2" _
), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("shtAgenda").Sort
.SetRange Range("A2:E" & reglinha)
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Gostaria que classificasse as duas, menor data e menor horário.
Att,
Francisco
Postado : 28/09/2016 11:21 am