+ Reply to Thread
Results 1 to 9 of 9

How to extract 7 alphanumeric character from Text

  1. #1
    Registered User
    Join Date
    06-22-2014
    Location
    Indore, M.P., India
    MS-Off Ver
    2010
    Posts
    26

    How to extract 7 alphanumeric character from Text

    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 =

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to extract 7 alphanumeric character from Text

    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.

  3. #3
    Registered User
    Join Date
    06-22-2014
    Location
    Indore, M.P., India
    MS-Off Ver
    2010
    Posts
    26

    Re: How to extract 7 alphanumeric character from Text

    read the 2nd one as 7 character 717S058

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: How to extract 7 alphanumeric character from Text

    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
    1
    ROY ENTERPRISES 717R032-MUM CITY 717R032
    2
    SAMSON 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

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: How to extract 7 alphanumeric character from Text

    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

  6. #6
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: How to extract 7 alphanumeric character from Text

    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 try
    Formula: copy to clipboard
    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

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to extract 7 alphanumeric character from Text

    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)

  8. #8
    Registered User
    Join Date
    06-22-2014
    Location
    Indore, M.P., India
    MS-Off Ver
    2010
    Posts
    26

    Re: How to extract 7 alphanumeric character from Text

    Thanks... it's working

  9. #9
    Registered User
    Join Date
    06-22-2014
    Location
    Indore, M.P., India
    MS-Off Ver
    2010
    Posts
    26

    Re: How to extract 7 alphanumeric character from Text

    Thanks Sarang

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] EXtract ALphanumeric from text string
    By Ellice16 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-30-2013, 03:34 AM
  2. Replies: 4
    Last Post: 08-05-2013, 07:27 AM
  3. extract numbers from alphanumeric text string if 1st tier not available
    By Ellice16 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-25-2013, 01:52 AM
  4. [SOLVED] VBA expression to extract the text from the beginning of an alphanumeric string
    By webfeet2 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-01-2012, 12:41 AM
  5. Extract TEXT from alphanumeric cell
    By rudeboymcc in forum Excel General
    Replies: 6
    Last Post: 10-23-2009, 01:41 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1