How to remove mail id from excel

There are a few ways to remove email addresses from Excel cells:

Method 1: Using the SUBSTITUTE function

  1. Select the cell(s) containing the email addresses.
  2. Type the following formula: =SUBSTITUTE(A1,"@","") (assuming the email address is in cell A1).
  3. Press Enter to apply the formula.
  4. The email address will be replaced with a blank string, effectively removing the @ symbol and the domain name.

Method 2: Using the REGEXREPLACE function (Excel 2013 and later)

  1. Select the cell(s) containing the email addresses.
  2. Type the following formula: =REGEXREPLACE(A1,"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}","") (assuming the email address is in cell A1).
  3. Press Enter to apply the formula.
  4. The email address will be replaced with a blank string, effectively removing the entire email address.

Method 3: Using the TEXT TO COLUMN feature

  1. Select the cell(s) containing the email addresses.
  2. Go to the "Data" tab in the ribbon.
  3. Click on "Text to Columns".
  4. In the "Text to Columns" dialog box, select "Delimited Text" and click "Next".
  5. In the "Delimiters" section, select "Space" or "Other" and enter a space or the character you want to use to separate the email address from the rest of the text.
  6. Click "Finish" to apply the conversion.
  7. The email address will be split into two columns, with the email address in one column and the rest of the text in another column.

Method 4: Using a VBA macro

  1. Open the Visual Basic Editor by pressing Alt + F11 or by navigating to "Developer" tab in the ribbon.
  2. Create a new module by clicking "Insert" > "Module" or by pressing Alt + F11.
  3. Paste the following code:
    Sub RemoveEmailAddresses()
     Dim rng As Range
     Set rng = Range("A1:A10") ' adjust the range to your needs
     For Each cell In rng
         cell.Value = Replace(cell.Value, "@", "")
     Next cell
    End Sub
  4. Replace A1:A10 with the range of cells containing the email addresses.
  5. Run the macro by clicking "Run" or by pressing F5.
  6. The email addresses will be removed from the cells.

Note: These methods may not work if the email addresses are formatted as text or if they contain special characters.