-
Macro
Sub SortAndMarkDuplicatesInColumnA()
Columns("A:A").Select
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Columns("A:A").Select
'Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=COUNTIF(A:A,A1)>1" 'for our country Czech Republic use "=COUNTIF(A:A;A1)>1"
Selection.FormatConditions(1).Interior.ColorIndex = 27
End Sub
GOOD LUCK AND GOOD NIGHT
Pavel Humenuk
Last edited by hardlife; 03-17-2009 at 09:43 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules