Remove alpha characters from alphanumeric string

azdub2

New Member
Joined
Mar 31, 2015
Messages
8
I need to remove the alpha characters, from an alphanumeric string. An example of what I have, is in column A and the results I want, are in column B.


A
B
1abcd
1
8.2b
8.2
13.12def
13.12
51ef
51

<tbody>
</tbody>

Any help is greatly appreciated.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
I have tried what is in that link to no avail. I need the the numbers and decimals ie 8.2 and 13.12. It needs to be a formula.
 
Upvote 0
I am searched high and low, but cannot find any formula only (non-VBA) solutions that leave the decimal point.
I could come up with a VBA solution to leave the decimal point, though that does not sound like what you want.
 
Upvote 0
I need to remove the alpha characters, from an alphanumeric string. An example of what I have, is in column A and the results I want, are in column B.


A
B
1abcd
1
8.2b
8.2
13.12def
13.12
51ef
51

<tbody>
</tbody>

Any help is greatly appreciated.
Are your numbers always at the beginning of the text like your examples above show?
 
Upvote 0
Try

=LOOKUP(9.99999999999999E+307,LEFT(A1,ROW(A$1:A$100))+0)

The 100 in A$1:A$100 needs only be as large as the possible length of string in the cell.

You could do this to vary it..
=LOOKUP(9.99999999999999E+307,LEFT(A1,ROW(A$1:INDEX(A:A,LEN(A1))))+0)
 
Upvote 0
Or
Code:
[B]=-LOOKUP(1,-LEFT(A1,COLUMN(A:O)))[/B]

Unknown
AB
11abcd1
28.2b8.2
313.12def13.12
451ef51
Sheet5
 
Last edited:
Upvote 0
"=LOOKUP(9.99999999999999E+307,LEFT(A1,ROW(A$1:A$100))+0)"

Thanks Jonmo1, that works perfectly.
 
Last edited:
Upvote 0
Hi azdub2
9.99999999999999E+307 is indeed a very big number. However, in the formula I provided I used 1 as a big number. You may have noticed that minus sign before LEFT function. The minus sign converts positive numbers to to negative thus making 1 larger than any negative number.
There is another minus sign added at the beginning of the formula which will convert negative to positive.
 
Upvote 0
That formula then needs to perform the - operation 16 times, once for each of the 15 LEFT functions +1 on the lookup.
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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
Back
Top