'How can I search in excel a bigger string than the cible string in the other table

I'm trying to search a string and get a corresponding status from an other table/sheet, but the string that I'm searching contain a bigger string than the targeted value.

For example I have the strings in the first table that I'm looking for :


  1. "Contract number is invalid : 000000786514 "
  2. "Contract number 000000786514 is not attached"
  3. "Contract number 000000786514 is Valid"

and a corresponding table for the status :


Contract number is invalid | KO

Contract is not attached | KO

Contract number is Valid | OK


How can I add a column in the first table with the corresponding status ?, I tried VLOOKUP but it didn't work because the searched value is bigger than the cible.

Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source