+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Score the similarity of the characters between several cells

  1. #1
    Registered User
    Join Date
    02-03-2012
    Location
    Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    23

    Question Score the similarity of the characters between several cells

    Hi people!!

    I'd like to give a "similarity" score to each code from a list of 4-digit codes:

    1321
    1311
    1311
    3533
    4925
    1389
    4922

    If one of the codes has the same first 4 digits than another code, it will receive a score of 4. If it has the same first 3 digits, a score of 3, and so on until 0.

    The result of the above list should resemble to this:

    1321 2
    1311 4
    1311 4
    3533 0
    4925 3
    1389 2
    4922 3

    Is it possible using an Excel formula?

    Your help is very much appreciated!
    Last edited by glux; 02-07-2012 at 05:14 AM.

  2. #2
    Registered User
    Join Date
    02-03-2012
    Location
    Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    23

    Question Re: Score the similarity of the characters between several cells

    I'm attaching the list so you can practice ;-) target-to-target similarity 3.xlsx

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Score the similarity of the characters between several cells

    A bit long winded but try this in B2
    Please Login or Register  to view this content.
    Drag/Fill Down.

    This should also work
    Please Login or Register  to view this content.
    These will return the values requested in post #1, in your attached sample the expected result differs.
    Attached Files Attached Files
    Last edited by Marcol; 02-07-2012 at 04:53 AM. Reason: Added attachment
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Registered User
    Join Date
    02-03-2012
    Location
    Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Score the similarity of the characters between several cells

    Hey Marcol!!! Thanks so much!! It's working!!

    Great job!

    It's actually the first step of a much more complex problem...

    But I will create a new post for the next step... and I will mark this post as SOLVED cause I like to see solved problems in this forum!! ;-)

  5. #5
    Registered User
    Join Date
    02-03-2012
    Location
    Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Score the similarity of the characters between several cells

    Hello Marcol... if you would like to help with the next step of my problem... here's the thread: http://www.excelforum.com/excel-2007...93#post2701493...

    ... there's gonna be a 3rd step ;-)

  6. #6
    Registered User
    Join Date
    02-03-2012
    Location
    Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Score the similarity of the characters between several cells

    Hello Marcol, the 2nd step was solved already!! Now I still have one final step: if you want to help, here's the thread: http://www.excelforum.com/excel-2007...26#post2701526

+ 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