Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
David
 
Posts: n/a
Default Search string for alpha or numeric

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?
  #2   Report Post  
Barb R.
 
Posts: n/a
Default

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

"David" wrote:

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?

  #3   Report Post  
Ron Coderre
 
Posts: n/a
Default

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)&"0123456789ABCDEFGHIJKLMN OPQRSTUVWXYZ")),LEN(A1))

Does that work?
--
Regards,
Ron


"Barb R." wrote:

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

"David" wrote:

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?

  #4   Report Post  
Ron Coderre
 
Posts: n/a
Default

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&"0123456789ABCDEFGHIJKLMNOPQRSTU VWXYZ")),LEN(A1))
--
Regards,
Ron

  #5   Report Post  
David
 
Posts: n/a
Default

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

"Ron Coderre" wrote:

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)&"0123456789ABCDEFGHIJKLMN OPQRSTUVWXYZ")),LEN(A1))

Does that work?
--
Regards,
Ron


"Barb R." wrote:

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

"David" wrote:

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search string with multiple criteria fLiPMoD£ Excel Worksheet Functions 2 May 5th 05 08:02 PM
How do I search for a string across multiple worksheets in Excel? BBiletch Excel Worksheet Functions 2 April 5th 05 11:59 PM
Numeric cell but shows as string? Brett Excel Worksheet Functions 9 March 24th 05 11:56 AM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM
Q: search in string JIM.H. Excel Discussion (Misc queries) 5 January 5th 05 10:24 PM


All times are GMT +1. The time now is 08:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"