+ Reply to Thread
Results 1 to 6 of 6

Compare characters of two cells and return the result

  1. #1
    Registered User
    Join Date
    11-24-2012
    Location
    Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    5

    Compare characters of two cells and return the result

    I want to compare the two values of cells (which may number or character text) and returned the result as I required.

    For example

    If A1 cell value is http://shahid.com and A2 cell value is http://shahidxyz.com


    Now my question is how to set formula in B1 cell to find http://shahid in A2 cell and return the result as "YES" in B1 cell if the value is found A2 cell otherwise "NO".


    Your best regard will be thankful
    Last edited by shahid6634; 11-24-2012 at 04:15 PM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Compare characters of two cells and return the result

    you could try
    =IF(ISNUMBER(FIND(LEFT(A1,FIND(".",A1)-1),A2)),"yes","no")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    11-24-2012
    Location
    Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Compare characters of two cells and return the result

    Thank you martindwilson

    Now I want to look up http://shahid.com in the entire column A. How to create formula for this condition.
    Please help me once again

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Compare characters of two cells and return the result

    what do you mean?

  5. #5
    Registered User
    Join Date
    11-24-2012
    Location
    Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Compare characters of two cells and return the result

    Suppose I have a list of 90 websites which is stored in Column A.
    Now I discover another website (http://shahid.com) place in cell B1, but I want to check the availability of this site in list of 90 websites which is already store in column A.

    How can I formulate this condition in cell C1. If, site found then show "YES" otherwise "NO"
    This is my actual query. Please see in Image

    check.jpg

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Compare characters of two cells and return the result

    =if(countif(a:a,b1),"in list,"not in list")

+ 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