+ Reply to Thread
Results 1 to 5 of 5

Compare an email address to a list of Names

  1. #1
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Woodbridge, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    111

    Compare an email address to a list of Names

    All,

    I am trying to see if an email address matches with a list of names in a worksheet. If so, it would proceed with code. For example, I have an email address '[email protected]' that we get through an input box and in the list, we find John Middlesburg. Since it is obvious that John Middlesburg is [email protected], how can I get it to go on through? Is there a way to do this?

    Thank you in advance for your help.

  2. #2
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Woodbridge, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    111

    Re: Compare an email address to a list of Names

    I just put this together but found a couple of issues with it. For example, it doesn't seem like it works if the cases are off and it definitely can't compare email addresses to the list of names in the worksheet. The only thing I found that works is if you type in Middle (from the example in the 1st post), then it will exit the for loop and give you an integer other than 0. Please let me know if you have any advice on how to improve this code. Thank you!

    Please Login or Register  to view this content.
    Last edited by s2jrchoi; 02-21-2014 at 03:40 PM.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Compare an email address to a list of Names

    Hello s2jrchoi,

    You could shorten the loop code to this...
    Please Login or Register  to view this content.
    Another method would be to use the Like operator...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Woodbridge, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    111

    Re: Compare an email address to a list of Names

    Hey Leith,

    I appreciate your help with this however the code to compare the strings will not work if an email address like "[email protected]" is provided. Is there a way to show that [email protected] is basically the same person as John Middlesburg?

    Thank you!

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Compare an email address to a list of Names

    Hello s2jrchoi,

    I would need to see a copy of your workbook. Email addresses can vary greatly and the more samples there are available to test the code with, the better.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Extract names and Email address's from text
    By juhaszp in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-10-2013, 10:41 AM
  2. Replies: 0
    Last Post: 02-21-2013, 04:46 AM
  3. need to copy names by matching email address from 2 lists
    By apparker in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-11-2013, 08:59 PM
  4. excel 2003: creating a standard email address from a list of names
    By mackinlay in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-09-2008, 09:37 AM
  5. [SOLVED] add email address to a list of names
    By biochemist in forum Excel General
    Replies: 5
    Last Post: 05-17-2005, 01:06 PM

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