The following tests range A2 to A7 for duplicate values.
Remark: This example illustrates a possible solution as a first approach to a solution. It's faster to use an array than a range and one could use collections or dictionaries or xml methods to check for duplicates.
Sub find_duplicates()
...