+ Reply to Thread
Results 1 to 6 of 6

check if cell contains 3 ampersands in it at any location

  1. #1
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    140

    check if cell contains 3 ampersands in it at any location

    Hey all,

    I'm trying to determine if a cell has three or more ampersands. But this fails:

    =FIND("&",A1)>2


    That always returns false if the value to right of operator is anything other than 0.

    In this example I want it to return true:

    ANDREU MARIA T & ANDREU BOB & ANDREU MARIA T &


    Thanks for response.
    Last edited by NBVC; 01-12-2011 at 11:35 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: check if cell contains 3 ampersands in it at any location

    try:

    =LEN(A1)-LEN(SUBSTITUTE(A1,"&",""))>=3
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    140

    Re: check if cell contains 3 ampersands in it at any location

    impressive!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: check if cell contains 3 ampersands in it at any location

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: check if cell contains 3 ampersands in it at any location

    FWIW, another might be:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    140

    Re: check if cell contains 3 ampersands in it at any location

    It seems someone has already marked it as solved? I didn't have computer access for a couple of days. thanks for response though.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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