+ Reply to Thread
Results 1 to 5 of 5

Email Validation Macro

  1. #1
    Registered User
    Join Date
    09-16-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    17

    Email Validation Macro

    Hi Everyone,

    I'd like to create a macro that validates if emails are properly entered in column A (minus the column heading) once the emails have already been entered. There should only be one email per cell, the email should be in proper format (which includes no spaces and unwanted characters), and all the cells with a mistake in them should be highlighted in orange and give one error message for all. Preferably I'd like this macro to be activated by a button in the active sheet.

    Thank you for your time and I'll appreciate all the help I can get.

    Regards,
    DrNo1

  2. #2
    Registered User
    Join Date
    08-15-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Email Validation Macro

    Please see the attached workbook. You need to set a reference to "Microsoft VBSript Regular Expressions 5.5" for this to work.

    Since Excel recognizes email addresses and creates a "mailto:" hyperlink there may be a method to use this to determine if an email address exists. I don't know though.
    Attached Files Attached Files
    Last edited by g8r777; 10-10-2012 at 11:04 PM.

  3. #3
    Registered User
    Join Date
    09-16-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Email Validation Macro

    Thanks g8r777, the validation works! Could you possibly amend the macro so that it doesn't check the column heading and that i can activate it using a button found on the active sheet?

    Again thank you!

  4. #4
    Registered User
    Join Date
    08-15-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Email Validation Macro

    See the attached file.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-16-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Email Validation Macro

    This is exactly what I was looking for and I learned so much from your code!

    Thank you very much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1