+ Reply to Thread
Results 1 to 6 of 6

How to extract text string with different LEN in a cell

  1. #1
    Registered User
    Join Date
    04-14-2014
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    97

    How to extract text string with different LEN in a cell

    Hi all,

    I have a data in my cell as below in Column A

    IP-L30-HPS-11-006
    IP-L30-A-01-001
    IP-L30-MDTA-31-002_A

    I need a result as below in B column

    HPS
    A
    MDTA

    Appreciated any helps.

    Thanks in advance,

    Rev12

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: How to extract text string with different LEN in a cell

    Is the leading text always "IP-L30-" ?

    if not , post a better sample FILE.


    Attach a sample workbook (not image).so that we do not have to manually key in your data to do a testing.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    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 text string with different LEN in a cell

    Try this
    Enter in B1 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B
    1 IP-L30-HPS-11-006 HPS
    2 IP-L30-A-01-001 A
    3 IP-L30-MDTA-31-002_A MDTA
    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

  4. #4
    Registered User
    Join Date
    04-14-2014
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: How to extract text string with different LEN in a cell

    Yes "IP-L30-" is always the leading text of a data

    I have tried

    =LEFT(SUBSTITUTE(A5,"IP-L30-"," "),5)

    but the formula could not give an exact results as I wanted as below for sample nos 2

    A-01

    the correct should be

    A

    thanks again.

  5. #5
    Registered User
    Join Date
    04-14-2014
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: How to extract text string with different LEN in a cell

    Thanks it gives me the result I need.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: How to extract text string with different LEN in a cell

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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/return specific text from cell/string
    By JE2BD in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-02-2015, 05:32 PM
  2. Extract and Copy Part of Text String From one cell to another
    By Chica SM in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-22-2014, 10:39 AM
  3. Formula to extract word out of text string in cell
    By Thonkhan in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-08-2014, 02:00 AM
  4. [SOLVED] Extract text from string in cell
    By VBA FTW in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-26-2013, 05:08 PM
  5. [SOLVED] Extract text from string in cell
    By VBA FTW in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2013, 04:14 PM
  6. Replies: 12
    Last Post: 09-15-2012, 10:20 PM
  7. Replies: 3
    Last Post: 07-25-2012, 07:54 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