Highlight Duplicate Column Cells In Google Sheets

Assume you have data like below and want to highlight the duplicate values:
To highlight, click on "Format" and select "Conditional Formatting"
Now select formatting RULE as "Custom Formula" and enter below formula.
=countif(A:A,A1)>1
