Which function should i use to extract below said alpha numeric character
Text Want to extract 7 alphanumeric character
ROY ENTERPRISES 717R032-MUM CITY = 717R032
SAMSON MEDIA 717IS058-MUM RURAL =
Which function should i use to extract below said alpha numeric character
Text Want to extract 7 alphanumeric character
ROY ENTERPRISES 717R032-MUM CITY = 717R032
SAMSON MEDIA 717IS058-MUM RURAL =
Your first example has a 7 character string but the second example has an 8 character string.
Do you want the entire string no matter how long it is or do you just want up to 7 of the characters as your question states?
Last edited by Tony Valko; 06-22-2014 at 10:23 PM.
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
read the 2nd one as 7 character 717S058
You should try this UDF (User defined function)
1. Copy code below
2. Press Alt and F11 on your keyboard to open VB Editor
3. Click on Insert and select Module
4. Paste code into Module and close VB Editor.
=Get7Digit(A1)
Please Login or Register to view this content.
A B 1ROY ENTERPRISES 717R032-MUM CITY 717R032 2SAMSON MEDIA 717S058-MUM RURAL 717S058
If you like my answer please click on * Add Reputation
Don't forget to mark threads as "Solved" if your problem has been resolved
"Nothing is so firmly believed as what we least know."
--Michel de Montaigne
Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.
Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.
Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!
Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
http://www.excelguru.ca/forums/forum...php?2-Formulas
Hi,
Welcome to the Forum.
Let's consider that your string are placed in column A from A1 onwards.
If those 7-character alphanumeric strings are always gonna start with '7' and will always end with a '-' sign, then tryFormula:Please Login or Register to view this content.
If my assistance has helped, there is a reputation icon * on the left hand corner below the post - you can show your appreciation to the user who has helped in resolving your requirement.
If your requirement has been solved please mark your thread as Solved.
In the menu bar above the very first post, select Thread Tools, then select "Mark this thread as Solved".
Kindly use [FORMULA] or [CODE] tags when posting your code.
Regards,
Sarang
Maybe this.
Assuming the string to extract always starts with a number and it will always be the first number in the entire string.
Data Range
A B 2 ROY ENTERPRISES 717R032-MUM CITY 717R032 3 SAMSON MEDIA 717IS058-MUM RURAL 717IS05
Entered in B2 and copied down:
=MID(A2,MIN(FIND({1,2,3,4,5,6,7,8,9,0},A2&1234567890)),7)
Thanks... it's working
Thanks Sarang
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks