manpuliation of text and numbers

jwalkerack

Board Regular
Joined
Jun 19, 2013
Messages
81
Hi there Guys ,

I have a 2 phase issue. The first part of it is that i have a text string and it contains a mix of numbers and letters

Sometimes its only numbers

Sometimes its numbers and Letters

Such as 01Z , 10 and 10z .

What i like to be able to do is clear out all of the letters, when they appear. I also want to retain the 01 format for 1. I know if i convert this to numbers and such it might lose this . Anyone have any ideas of how to remove the letters

Regards
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Just to make the choice wider:

=LEFT(A1,2+1*((MID(A1,3,1))<"A"))
Good one István: shorter & fewer functions. :)

Could we take that process (shorter) even a little further?

=LEFT(A1,2+(MID(A1,3,1)<"A"))
 
Upvote 0
Hi guys , i actually noticed i have a problem with this . i probably wrote down wrong , what the contraints where.

This works perfectly if you have a TEXT STRING WHICH is three characters long. such as 19a , it would covnert to 19 perfectly . But it the orginal string was 9a , it would convert to only 9a. is there a way of doing this , when there is differnt counts of strings ?

Cheers Jack
 
Upvote 0
Hi guys , i actually noticed i have a problem with this . i probably wrote down wrong , what the contraints where.

This works perfectly if you have a TEXT STRING WHICH is three characters long. such as 19a , it would covnert to 19 perfectly . But it the orginal string was 9a , it would convert to only 9a.
Yes, you wrote the following which implied at least 2 digits. ;)
The numbers can count up to anything bewteen 01 and 999.


is there a way of doing this
Tried post #7?
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,988
Members
452,373
Latest member
TimReeks

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