edit: Ooops, I think I misread the question. Did not factor in the length of the string, but instead went for distinguish between pure alpha and alphanumeric. Ah well, maybe someone else will need that, so I'll leave it here.
Hi, welcome to the board.
It's ugly but it can be done. Generally, Excel does not distinguish between text and alphanumeric. If it contains letters, then to Excel it's text. So we need to check if the text contains the digits 0-9. The formula below uses the SEARCH function for that. Unfortunately, SEARCH (and FIND as well) return #VALUE when the search item is not found, so we need to embed it into an IF statement to convert the #VALUE to a zero and a successful find into a 1.
We add up the results for all the searches for digits 0 - 9. If the sum is 0, it means that the cell is purely alpha, so the formula returns THREE. If the som of the search is a number greater than zero, it means that at least one digit has been found, so the text is alphanumeric. So now we check the four leftmost characters and if they equal S999, return ONE, otherwise, return TWO.
Here is the beast:
put into cell B3 and copy down.
enjoy
Bookmarks