Hi all,
I have a list of strings in column A and I want to search strings that are smaller and larger than the list in column A.
To search smaller strings I could use wildcard within VLOOKUP(), but how to search larger strings?
For example, if I compare the string ABCDEFGHIJKLM in D5 with the strings in Col A, the strings that are more similar with string in D5
are ABCDEFG and ABCDEFGHIW, but the selected should be ABCDEFGHIW since it has 9 characters in common and only has 7 characters
in common with string ABCDEFG. So, the Letter related is Y, that would be the correct answer.
ABCDEFGHIJKLM
ABCDEFGHIW --> 9 characters in common in same order from left to right
ABCDEFGHIJKLM
ABCDEFG --> 7 characters in common in same order from left to right
I have a list of strings in column A and I want to search strings that are smaller and larger than the list in column A.
To search smaller strings I could use wildcard within VLOOKUP(), but how to search larger strings?
For example, if I compare the string ABCDEFGHIJKLM in D5 with the strings in Col A, the strings that are more similar with string in D5
are ABCDEFG and ABCDEFGHIW, but the selected should be ABCDEFGHIW since it has 9 characters in common and only has 7 characters
in common with string ABCDEFG. So, the Letter related is Y, that would be the correct answer.
ABCDEFGHIJKLM
ABCDEFGHIW --> 9 characters in common in same order from left to right
ABCDEFGHIJKLM
ABCDEFG --> 7 characters in common in same order from left to right
File1.xlsx | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | STRING | LETTER | STRING SMALLER THAN COL A STRINGS | LETTER | |||
2 | ABCJKPOR | Q | ABCDE | H | |||
3 | ABCDEFG | H | |||||
4 | ABCKKHSPLLZ | T | STRING LARGER THAN COL A STRINGS | LETTER | |||
5 | ABCDEFGHIW | Y | ABCDEFGHIJKLM | Y | |||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E2 | E2 | =VLOOKUP(D2&"*",A1:B5,2,FALSE) |