Hi,
I have a collection of words that I'd like to search for against a single column of phrases, when the closest possible match is found, it should return an adjacent value from the column of phrases searched. The complexity I have, is for each collection of words, i need to try all possible combinations of match.
Example. I have the following collection of words in A1
Collection of words
A1: word1 word2 word3
I need to search the entire column of B to find the best match.
A Best match would contain all words & in the order of the collection of words.
In the example below: B5 wins.
B5 word1 word2 word3 word4
If B5 didn't exist, a subsequent best match would be greatest number of words in any order.
In this example, B3 word3 word2 word1 would win, (pretending B5 doesn't exist) since there's no exact match, the adjacent value in C3, is 3. This is then populated to D1.
Single column of phrases
B1 word1 word3
B2 word1
B3 word3 word2 word1
B4 word1 word2
B5 word1 word2 word3 word4
Adjacent value to return
C1 1
C2 2
C3 3
C4 4
C5 5
Results
D1 3
D2
D3
D4
D5 5
Hopefully explained myself well enough for others to follow, am hugely appreciative to anyone who can help me with this.
Best Rgds
Marcus
Bookmarks