I can't test this without the workbooks, but try this
Option Explicit
Sub Macro3()
Dim wbFrom As Workbook
Dim CopyRange As Range
Dim UniqueRange As Range
Dim TargetCell As Range
Set wbFrom = Workbooks.Open(Filename:="T:\SST\CCD\Engineering\Backthin_data\Photolith\MASK_DETAILS.xls")
With wbFrom
Set TargetCell = Cells(1, Columns.Count)
Set CopyRange = Sheets("Mask List").Range(Cells(4, 5), Cells(Rows.Count, 5).End(xlUp))
CopyRange.AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=TargetCell, Unique:=True
Set UniqueRange = Range(TargetCell, TargetCell.End(xlDown))
UniqueRange.Sort Key1:=Range("E1:e2000"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
UniqueRange.Copy Workbooks("Dry_etcher_log_B.xls").Sheets("Calc Sheet").Range("M1")
.Close False
End With
End Sub
Bookmarks