Validate e-mail address in a cell in Excel

It is useful to verify if the input in a cell where email address should go is a valid input. In MS Excel we can use a validation functionality to perform an input validation.

  1. Select a cell in your worksheet in Excel
  2. Choose Data > Validation from the menu
  3. In field called Allow select “Custom” option
  4. In Formula field type in the following code:
    =SEARCH(".",A1,(SEARCH("@",A1,1))+2)

    (Note: this examples assumes you have selected cell A1)

And what does this formula do? It looks for an “at” symbol first and if it finds it it continues with the search and looks for a dot symbol. It returns the position of the dot symbol.