+ Reply to Thread
Results 1 to 9 of 9

Extract the 6 digit value from the string

  1. #1
    Forum Contributor
    Join Date
    09-15-2011
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    135

    Extract the 6 digit value from the string

    Hi All,

    Hope you are doing well... let's get started my question here. i have a excel file which contains 1000 rows based on the SNOW ticket was raised ( three columns 1. subject 2.created date 3. Tkt problem).

    the challenge is here the third column Please refer the screen shot it's showing warp text unable to split that and i need the split "NSI124" and "MJA268" these 6 digit numbers only.

    is this possible to split the data. Thank you.

    Thanks/Raju
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by rajuganapathy; 06-03-2019 at 09:13 PM.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Extract the 6 digit value from the string

    Will the field names ("User id", "Site id" and "Mirror id" always be the same, and always be present in the text? Is the colon always present between the field name and the value?

    One row of sample data is not much to work with...
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Hi !

    Quote Originally Posted by rajuganapathy View Post
    is this possible to split the data.
    Use MATCH worksheet function or Range.Find VBA method to locate desired cells
    then extract the text via Mid, Replace or Split VBA functions, to see in VBA inner help …

  4. #4
    Forum Contributor
    Join Date
    09-15-2011
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    135

    Re: Extract the 6 digit value from the string

    Hi Olly,

    yes it should be the same only...

    Thanks/Raju

  5. #5
    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: Extract the 6 digit value from the string

    It shouldn't be to much trouble to extract IDs from the string
    Enter formula in B2 and drag formula across.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C D
    1
    2 USER ID : NSI124
    SITE ID : INDI02
    MIRROR ID : MJA268
    NSI124 INDI02 MJA268
    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

  6. #6
    Forum Contributor
    Join Date
    09-15-2011
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    135

    Re: Extract the 6 digit value from the string

    Hi Alkey,

    Thanks for your reply, but it will not work.Cause i have wrap text format in excel copied from somewhere while you expand/ Press F2 the above said info was appear. so am attaching the file for your perusal. Thank you.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,591

    Re: Extract the 6 digit value from the string

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    09-15-2011
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    135

    Re: Extract the 6 digit value from the string

    Genius Jindon, indeed working perfect but as a vba learner i didn't understand the code how it's working would you please help me get an knowledge on coding.....

    Regards/Raju

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,591

    Re: Extract the 6 digit value from the string

    Used Regular Expression. (google for the details)

    Find matching pattern that is

    UID or User ID
    Mirror ID

    followed by a colon or hyphen and the rest up to end of the line.

    This is according to your uploaded data.

+ 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. Extract first 10 digit if preceding semicolon is >10 digit
    By waffleboy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-02-2018, 05:01 AM
  2. Replies: 3
    Last Post: 03-19-2016, 01:11 AM
  3. [SOLVED] extract 10 digit number only from text string
    By visha_1984 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-06-2015, 09:42 AM
  4. [SOLVED] Extract Exact 6 Digit Number From String
    By tt388 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-11-2013, 12:51 PM
  5. Extract 9 digit number from string
    By Jbentley in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-16-2011, 07:02 AM
  6. [SOLVED] Extract 10 digit number from string
    By R. Choate in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 10-27-2005, 06:05 PM
  7. [SOLVED] Extract 2, 3, 4 or 5-digit number from string
    By Jim in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2005, 10:22 AM

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