Search string for alpha or numeric

G

Guest

I have a text string that looks something like this: "| |- - - Whatever" or
"|- | - - 51250". I'd like to remove the leading characters by searching for
the first alpha or numeric value then possibly using a Mid function to take
everything to the right of that alpha or numeric. What functions can be used
to accomplish this?
 
G

Guest

Try using the SEARCH function to find the location of the end of the text
string and use a MID from there.
 
G

Guest

Try this:

=MID(A1,MIN(SEARCH({"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"},UPPER(A1)&"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ")),LEN(A1))

Does that work?
 
G

Guest

Formula correction...

This may seem trivial, but SEARCH is not case sensitive, so the UPPER
function is not necessary:

=MID(A1,MIN(SEARCH({"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"},A1&"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ")),LEN(A1))
 
G

Guest

You just saved me a few hours of pulling my hair out. Both I and my barber
thank you!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top