Removing numerical text values and leaving only alpha letters

Executioner

Board Regular
Joined
Sep 26, 2005
Messages
166
Hi everyone,
I have one column A of data that looks like this:

AAL2074883-XX / A
AAL2075713-XX / A
AAL2075715-XX / A
AP2925411 / D
AP2928142 / H
AP2928142 / J

I have inserted a new column B so I can filter the alpha characters only. In the example above, it should look like:
Code:
A                        B
AAL2074883-XX /  A	AAL
AAL2075713-XX /  A	AAL
AAL2075715-XX /  A	AAL
AP2925411 /  D	        AP
AP2928142 /  H	        AP
AP2928142 /  J	        AP

The formula that I'm working with looks like this:
=LEFT(A2,3-ISNUMBER(MID(A2,2,1)+0))

This works only for the first 3 rows. Rows with only 2 alpha characters show up with a number - AP2 for example. Not sure how to adjust my formula to make it work correctly. Thanks for your help.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Try eg:

=LEFT(A2,MATCH(TRUE,INDEX(ISNUMBER(MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1)+0),),FALSE)-1)
 

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,887
Hi

Another option:

=LEFT(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))-1)
 

meldoc

Well-known Member
Joined
Jul 18, 2009
Messages
1,249
Hello

Or this, another one of Andrew's modified slightly.

=SUBSTITUTE(A2,MID(A2,MIN(SEARCH({0;1;2;3;4;5;6;7;8;9},A2&1234567890)),100),"")
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,113
Messages
5,857,454
Members
431,880
Latest member
kar2rost

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top