se quiser ordenar as datas na coluna 'I' ative a penúltima linha do código removendo o apóstrofo inicial
Sub ListaDatas()
Dim LRa As Long, LRi As Long, Ocel As Range
Dim Datas As Range, Datad As Range, Datah As Range
LRa = Cells(rows.Count, 1).End(xlUp).Row
LRi = Cells(rows.Count, 9).End(xlUp).Row
Set Datad = Range("D2:D" & LRa)
Set Datah = Range("H2:H" & LRa)
Set Datas = Union(Datad, Datah)
Range("I2:I" & LRi).ClearContents
For Each Ocel In Datas
If Application.CountIf(Columns(9), Ocel.Value) < 1 Then
LRi = Cells(rows.Count, 9).End(xlUp).Row
Cells(LRi + 1, 9) = Ocel
End If
Next Ocel
'Range("I2:I" & LRi + 1).Sort Key1:=Range("I2"), Order1:=xlAscending
End Sub
Postado : 22/04/2012 4:13 pm