View Single Post
 
Old 07-17-2017, 11:55 PM
kleanthis1 kleanthis1 is offline Windows 8 Office 2013
Novice
 
Join Date: Jul 2017
Posts: 7
kleanthis1 is on a distinguished road
Default i'm going up to H500 because I wont have more than that in any data file.

I'm going up to H500 because I wont have more than that in a data file.


Quote:
Originally Posted by kleanthis1 View Post
Sub Macro3()
'
' Macro3
'

'
Columns("A:A").Select
Selection.Copy
Sheets("Sheet8").Select
Columns("H:H").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWorkbook.Worksheets("Sheet8").Sort.SortField s.Clear
ActiveWorkbook.Worksheets("Sheet8").Sort.SortField s.Add Key:=Range("H1"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Sheet8").Sort
.SetRange Range("H2:H500")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ActiveSheet.Range("$H$1:$H$500").RemoveDuplicates Columns:=1, Header:=xlNo

End Sub
Reply With Quote