There are numerous ways this can be done.
But I am thinking you probably don't need to use Macros for this.
So I have a spreadsheet that might work for you.
I didn't create it. But found it on this site listed under sheet based unique list.
Column B is a list of entries
The length of that list is stored in the named range "List"
The start row of the output is stored in the named range "List_Start"
an array formula entered using ctrl & shift & enter is used to enter the formula in column B.
=IF(COUNT(IF(MATCH(List,List,0)=(ROW(List)-ROW(List_Start)+1),COUNTIF(List,"<"&List)+1,""))>(ROW(List)-ROW(List_Start)),INDEX(List,MATCH(SMALL(IF(MATCH(List,List,0)=(ROW(List)-ROW(List_Start)+1),COUNTIF(List,"<"&List)+1,""),(ROW(List)-ROW(List_Start)+1)),IF(MATCH(List,List,0)=(ROW(List)-ROW(List_Start)+1),COUNTIF(List,"<"&List)+1,""),0)),"")
Bookmarks