View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
ConfusedNHouston ConfusedNHouston is offline
external usenet poster
 
Posts: 41
Default Removing Trailing Alpha?

This works but there's a hitch. I have many 001, 020, 045, type records in
the file. It's converting these to 1, 20, 45 respectively. I'm building a
load file to move data from a legacy system to our upcoming system. The load
program is expecting these zeros to be there.

Is there some way to do what you've suggested below but to bring the leading
zeros into the column as well?

Thanks

"JMB" wrote:

if there is only one alpha character at the end (and there's no trailing
spaces in the data), you could try

=--IF(ISNUMBER(--A1),A1,LEFT(A1,LEN(A1)-1))


"ConfusedNHouston" wrote:

I have a column of data that looks like the following:

1501
1501B
1520
1530
1530B
11
11B
120
120C
120D

I want to pull the numerals from the cells and somehow "discard" the alpha
portion of the datum therein. I've tried, RIGHT, 1) with the intention of
doing a sort; but that pulls the numerics if there is no alpha. I've tried
Find and Replace *B with * and it puts a handy little star in place of the
orginal datum. I've messed around with MID, Cell, 1,4) but that doesn't
impact the 3 numeral - 1 alpha combinations.

I'm assuming there is an easy way of doing this. I'd appreciate your help
with this problem. Thanks,