+ Reply to Thread
Results 1 to 8 of 8

Identifying duplicate Characters

  1. #1
    Registered User
    Join Date
    01-17-2011
    Location
    Kent
    MS-Off Ver
    Excel 2007
    Posts
    34

    Identifying duplicate Characters

    Hi Guys,

    i need a bit of code that will identify if a cell contains more than one "@" (to help in my validation of email addresses).

    at the moment, i'm using:

    Please Login or Register  to view this content.
    but this obviously returns nothing unless the cell in question only contains "@" on its own. any help?
    Last edited by AppSupportKarl; 01-20-2012 at 01:01 PM.

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Identifying duplicate Characters

    maybe:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-14-2004
    Posts
    6

    Re: Identifying duplicate Characters

    =LEN(A1)-LEN(SUBSTITUTE(A1,"@",""))

    This is a function you could use. Just check if its more than 1.

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Identifying duplicate Characters

    Yep, use gazzabj's solution if you're using it on a sheet, but mine should be faster in code.

    Though it really won't matter if you're only calling it once

  5. #5
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,527

    Re: Identifying duplicate Characters

    Try this:

    Please Login or Register  to view this content.
    HTH

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Identifying duplicate Characters

    Alternatively, this will validate most email addresses
    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,527

    Re: Identifying duplicate Characters

    Hey Kyle123,

    That email UDF is pretty cool

    Thanks for posting it.

    Robert

  8. #8
    Registered User
    Join Date
    01-17-2011
    Location
    Kent
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Identifying duplicate Characters

    Cheers guys, i used Kyles first suggestion succesfully, but your second function seems extremely helpful... To the batcave!!!

+ 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