Excel: Data validation to search for particular string
Posted on 2012-03-14
I have a spreadsheets with 16000 product codes in 31 old product groups, which I need to assign to new product groups.
There are 6 new product groups.
The problem is that the old product groups are not contained as a separate value in a column, but is part of the product code. The code contains redundant elements as prefix and suffix, and the identifier is in the middle of those between two periods.
So for instance:
10000.ABCD.0001 belongs to Product group MEDIA
12333.ADDE.0001 belongs to Product group MEDIA also
12333.BCDA.0001 belongs to Product group PACKAGING
i.e. the first 5 digits, the 2 periods and the last 4 digits are irrelevant for this purpose. Only the 4 letter identifier links to the new product groups.
I have a table with all the 31 identifiers mapped to the new groups.
I now need to compile a formula to check the product codes for the identifier value from the table and return the new product groups for each product code in a new cell.
I know how to do lookups for whole cell values but don't know how to compile the correct syntax for the formula to only match a certain part of the contents to an array.
Any help would be appreciated.