![]() |
Extract String based on condition
How can I extraxt a string that begins with a certain number and is only X
amount of digits long? Example: I need to extract where an "8" is found, and the next 6 spaces that immediately follow: fgte8575684vrdef - Resut should be 8575684 Any ideas? Thanks. |
Extract String based on condition
=MID(A1,Find("8",A1),8)
-- HTH RP (remove nothere from the email address if mailing direct) "Send Object Command - Two attachments" soft.com wrote in message ... How can I extraxt a string that begins with a certain number and is only X amount of digits long? Example: I need to extract where an "8" is found, and the next 6 spaces that immediately follow: fgte8575684vrdef - Resut should be 8575684 Any ideas? Thanks. |
Extract String based on condition
Bob didn't really mean that.
What he really wanted to say was : =MID(A1,FIND("8",A1),7) -- Regards, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Bob Phillips" wrote in message ... =MID(A1,Find("8",A1),8) -- HTH RP (remove nothere from the email address if mailing direct) "Send Object Command - Two attachments" soft.com wrote in message ... How can I extraxt a string that begins with a certain number and is only X amount of digits long? Example: I need to extract where an "8" is found, and the next 6 spaces that immediately follow: fgte8575684vrdef - Resut should be 8575684 Any ideas? Thanks. |
Extract String based on condition
Try...
=IF(MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"01 23456789")),1)+0=8,MID( A1,FIND(8,A1),7),"") Hope this helps! In article , "Send Object Command - Two attachments" soft.com wrote: How can I extraxt a string that begins with a certain number and is only X amount of digits long? Example: I need to extract where an "8" is found, and the next 6 spaces that immediately follow: fgte8575684vrdef - Resut should be 8575684 Any ideas? Thanks. |
Extract String based on condition
Thanks to both
"RagDyer" wrote: Bob didn't really mean that. What he really wanted to say was : =MID(A1,FIND("8",A1),7) -- Regards, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Bob Phillips" wrote in message ... =MID(A1,Find("8",A1),8) -- HTH RP (remove nothere from the email address if mailing direct) "Send Object Command - Two attachments" soft.com wrote in message ... How can I extraxt a string that begins with a certain number and is only X amount of digits long? Example: I need to extract where an "8" is found, and the next 6 spaces that immediately follow: fgte8575684vrdef - Resut should be 8575684 Any ideas? Thanks. |
All times are GMT +1. The time now is 10:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com