forgot to change .Columns("A:A").Sort key1:=Range("A1"), order1:=xlAscending, Header:=xlYes to .Columns("A:A").Sort key1:=.Range("A1"), order1:=xlAscending, Header:=xlYes