find first letters in a string of alphanumerics

zpierucci

New Member
Joined
Sep 5, 2019
Messages
42
I have a string ex: ".13 - LAR"

I would like to get the first letters, or non alphanumeric and non numeric characters of the string. They are not always the same distance from the beginning so I can't use left or right function. However they always begin in the 6th or 7th position.

Any thoughts?
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Is there always a hyphen between numbers and text?
 
Upvote 0
If it's always going to be three letters then how about this for a string that is in Cell A1...

=IF(OR(AND(CODE(MID(A1,6,1))>64,CODE(MID(A1,6,1))<91),AND(CODE(MID(A1,6,1))>96,CODE(MID(A1,6,1)<123))),MID(A1,6,3),MID(A1,7,3))
 
Last edited:
Upvote 0
Just for finding the string starting with a letter:
=MID(A1,MIN(FIND(CHAR(ROW(INDIRECT("65:90"))),A1&"ABCDEFGHIJKLMNOPQRSTUVWXYZ"))-1,255)

or finding the string after the last space:
=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",255)),255))
 
Upvote 0
If your question has not been answered by any of the suggestions so far, what about giving us a variety of sample data and the expected results.
One example makes it hard for helpers who then have to try and guess the logic for your other data that we haven't seen. ;)
 
Upvote 0
It would be nice to know what you are saying "Yes" to.
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,843
Members
449,051
Latest member
excelquestion515

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