You could easily do this without VBA by using Advanced Filter with the option to copy unique values to a new location.

If this is something you will do often, automating Advanced Filter is faster than looping through a lot of cells.

Excel Advanced Filter