Search code examples
excelexcel-2010

How to extract text strings in Excel which follow specific formats


I have a mixed set of item descriptions which list their ANSI Cut levels. For example,

Nitrile Coated Glove, PolyKor, A4

PU Coated Glove, Knit PolyKor Blended A3

PU Coated Glove, A5, Lime w/Grey Coating

However the "A_" is in different places in the descriptions. I have tried using SEARCH("A?",) however it returns the position of the first A*, which is not quite what I'm looking for.

Is there any way for me to specify on the wildcard that I am looking for a 2-character text string, starting with A and ending with one number?

Any help would be appreciated!


Solution

  • To find position of the only pattern A# use formula:

    =SUMPRODUCT(IFERROR(SEARCH("A"&{1,2,3,4,5,6,7,8,9,0},A1),0))
    

    enter image description here