Remove Duplicates Automatically Based on Entries in Multiple Columns

How to remove duplicates automatically based on entries in multiple columns using VBA.

Here’s the VBA code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.RemoveDuplicates Columns:=Array(2, 3, 4), Header:=xlYes
End Sub