Veja se é isto :
Clique com o botão direito na aba e escolha "Exibir Código" e copie e cole :
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 1 Then
ActiveSheet.Sort.SortFields.Clear
Application.EnableEvents = False
With ActiveSheet.Range("A1", Range("A" & Rows.Count).End(xlUp).Address)
.Sort Key1:=[A2], Order1:=xlAscending, Header:=xlYes
.RemoveDuplicates Columns:=1, Header:=xlYes
End With
End If
Application.EnableEvents = True
End Sub
[]s
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 14/08/2015 10:17 am