I am looking for some formula that can compare 2 strings, and note the differences between them. This is pretty complex, so I will start with an example of what I would like it to do, however anything -close- to the intended result should suffice. I will follow with a few ideas that might be able to help guide somebody who is better than myself

123456 126456 1
123456 12356 1
123456 124567 2
123456 213456 2
123456 123456-7 2
123456 214567 4
123456 123456 0

The goal here is to have 2 columns of data(A/C) - for each cell in column A, I want it to scan column C for the lowest-value difference, and report that value(the actual text in C, not the number) in column B. This is a terribly simplified example, as most values will differ by only 2 or 3 for their lowest value, and there will almost never be any ties (if so, just saying the first one is fine). The average string is 20ish characters long.

Ideas: count the number of each different character in a cell, and each pair of characters possible, and then count each other cell the same way. IE 123456 would have one "1", one "12", one "23" etc. The drawback to this is obviously a huge count of letters, spaces, and dashes (28+28^2=812 different strings to count).

(will fill in more ideas if I have any)