How to find same mail id in excel
To find duplicate email addresses in Excel, you can follow these steps:
Method 1: Using the COUNTIF function
- Select the range of cells that contains the email addresses.
- Go to a new column next to the email addresses.
- Enter the formula:
=COUNTIF(A:A, A2)>1
(assuming the email addresses are in column A). - Press Enter to apply the formula.
- This will return a value of 1 if the email address is unique, and a value greater than 1 if it's a duplicate.
- Filter the column to show only the rows with a value greater than 1 to find the duplicate email addresses.
Method 2: Using the Advanced Filter
- Select the range of cells that contains the email addresses.
- Go to the "Data" tab in the ribbon.
- Click on "Advanced" in the "Data Tools" group.
- In the "Advanced Filter" dialog box, select "Copy to another location".
- Enter the criteria:
Email Address
is equal toEmail Address
. - Click "OK" to apply the filter.
- This will copy the duplicate email addresses to a new location.
Method 3: Using the Remove Duplicates feature
- Select the range of cells that contains the email addresses.
- Go to the "Data" tab in the ribbon.
- Click on "Remove Duplicates" in the "Data Tools" group.
- In the "Remove Duplicates" dialog box, select the column that contains the email addresses.
- Click "OK" to apply the feature.
- This will remove all duplicate email addresses, leaving only unique ones.
Method 4: Using a VBA Macro
- Open the Visual Basic Editor by pressing
Alt + F11
or by navigating to "Developer" tab in the ribbon. - Create a new module by clicking "Insert" > "Module".
- Paste the following code:
Sub FindDuplicates() Dim rng As Range Set rng = Range("A:A") ' adjust the range to your email addresses Dim dict As Object Set dict = CreateObject("Scripting.Dictionary") For Each cell In rng If dict.Exists(cell.Value) Then dict(cell.Value) = dict(cell.Value) + 1 Else dict.Add cell.Value, 1 End If Next cell For Each key In dict If dict(key) > 1 Then MsgBox "Duplicate email address: " & key End If Next key End Sub
- Save the module by clicking "File" > "Save" (or press
Ctrl + S
). - Run the macro by clicking "Run" > "FindDuplicates" (or press
F5
).
These methods will help you find duplicate email addresses in Excel.