how to use wild card in if funtion

  • Thread starter Thread starter doyree
  • Start date Start date
D

doyree

Hello

i have a question regards to using wild card in IF function

A
APPLE 1
APPLE A
APPLE 2
APPLE B

i wrote a formula like that would sort ablove like this
b2=APPLE NUMBER
b3=APPLE LETTER
b4=APPLE NUMBER
and etc.

thank you much!!
 
We can test the last character with ISNUMBER()

=LEFT(A1,LEN(A1)-1) & IF(ISNUMBER(--RIGHT(A1,1)),"NUMBER","LETTER")

and copy down
 
Gary,

thank you very much for the formula
but how about when those digits or letters at the end has more than 1?
say
apple 123
apple ab
apple 1234
etc

thank you!!!
 
=LEFT(A1,6) & IF(ISNUMBER(--RIGHT(A1,LEN(A1)-6)),"NUMBER","LETTER")

Note that the number 6 in the above formula is where the space is. If you
had an arbitrary word instead of APPLE, then we would use the FIND() function
to locate that space.
 
Back
Top