Thread: Trim Function
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Breitenbach
 
Posts: n/a
Default Trim Function

If there is always only one letter as the alpha, then the following formulas
will work:
[b1]=IF(ISNUMBER(A1),A1,LEFT(A1,LEN(A1)-1))
[c1]=IF(ISNUMBER(A1),"",RIGHT(A1,1))

However, if any of your values have spaces at the end, then the data will
have to be trimmed first - simply trim(a1) and then adjust the other formulas
to link to the trimmed version of the data column.

If the alpha can be more than one character then it can probably still be
done but more info will be needed on the rules that the alphas follow...i.e
when is there more than one character, etc.

hth,
Dave

"Matt M HMS" wrote:

Hello and thanks in advance -

I have a column of room numbers with [alphas] mixed in as seen below.

A
100
101D
103F
104
1004E

Note that the numeric values are sometimes in the thousand range. I need to
create a column B where the numeric value of the room number will be split up
from column C, the alpha, as below;

A B C
100 100
101D 101 D
103F 103 F
104 104
1004E 1004 E

Matt