I am designing a system that will essentially return values for scanned bar codes. In that, one would scan the bar code, and the serial number in the A column of Excel would be generated. Scanning another bar code would generate the serial number in the spot below the first number in the A column and so forth. To know what product name to return, the formula is meant to read the prefix (since the numbers following the prefixes will always change) and then return the product name if the serial number contains the prefix.
*See attachment and the formulas within for further visual aid*
The "#" is meant to symbolize a number, so that in the second part of the formula (currently where the "?" is) the system will read "B123" only as a "B", and not a "BB" or a "BG" etc. (because the only place where "B" is the first character and a number is the second character is in the instance of "B123" or "B2345" and so on).
(After looking at the sheet, the following may help with understanding of the issue)
I was hoping to have the "?" in the 2nd character slot of the second part of the formula look for only a number, which would theoretically only return CEREAL, since the only place where "B" is in slot 1 and a number is in spot 2, would be in serial numbers like "B123", because "BB" would fail the second part of the AND formula (where slot 2 needs to be a number); and an instance like "C123" would fail the first part, because while the second slot is a number, the first is not a "B".
MY SOLUTION was based on the hope that there is a symbol that can designate "any letter" or "any number". The trouble I had with the wildcard is that the "?" responds to any character, be it number AND letter. If for example "@" hypothetically symbolized any letter, then I would just put a "NOT(" in front of the second part of the equation, so that it would read something like "If the first character is B, AND the second character is NOT a letter (symbolized via the @), then return CEREAL". Or if the "#" symbolized any number, then it could be "If the first character is B, AND the second character is ANY NUMBER (due to the #), then return CEREAL".
How do you represent "any letter" in excel???
Solved by F. D. in 22 mins