+ Reply to Thread
Results 1 to 5 of 5

How to extract certain number LEFT from the criteria if it's found in the cell

  1. #1
    Registered User
    Join Date
    01-24-2019
    Location
    Slovakia
    MS-Off Ver
    2016
    Posts
    2

    Question How to extract certain number LEFT from the criteria if it's found in the cell

    I have a very long list of product description from which I need to only extract the capacity of HDD. Basically what I need is a function which would return me the number's left from "GB". Some examples of the the product description:
    ESG_HDD_SAS12G_600GB_10K_2_5_CFG
    ESG_HDD_SAS12G_ISE_300GB_15K_2_5_CFG,
    ESG_HDD_SAS12G_ISE_512E_900GB_15K_2_5_CFG

    As you can see the position of "GB" and the associated numbers always changes so the common string function is not working for me. Any help here would be highly appreciated

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: How to extract certain number LEFT from the criteria if it's found in the cell

    If that data is in A2 down, then you can use this in B2:

    =MID(A2,SEARCH("GB",A2)-3,3)

    then copy down.

    Hope this helps.

    Pete

  3. #3
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: How to extract certain number LEFT from the criteria if it's found in the cell

    =trim(right(substitute(left(a1,find("gb",a1)-1),"_",rept(" ",len(a1))),len(a1)))

  4. #4
    Registered User
    Join Date
    01-24-2019
    Location
    Slovakia
    MS-Off Ver
    2016
    Posts
    2

    Re: How to extract certain number LEFT from the criteria if it's found in the cell

    Thank you both for the reply! Both worked but the function =trim(right(substitute(left(a1,find("gb",a1)-1),"_",rept(" ",len(a1))),len(a1))) is working for me even better as I can use it in IF function combining with other criteria. So amazing that I've got replies in such a short time. This was my first time I posted here something and I feel now encouraged to do it more frequently! cheers

  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: How to extract certain number LEFT from the criteria if it's found in the cell

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

    v A B
    1
    2 ESG_HDD_SAS12G_600GB_10K_2_5_CFG 600
    3 ESG_HDD_SAS12G_ISE_300GB_15K_2_5_CFG, 300
    4 ESG_HDD_SAS12G_ISE_512E_900GB_15K_2_5_CFG 900
    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

+ 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] Using left Function to extract data based on several Criteria
    By Howardc1001 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-07-2019, 11:38 AM
  2. Replies: 14
    Last Post: 09-03-2018, 01:45 PM
  3. [SOLVED] Extract value left of priod in mixed text and number
    By Vestlink in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-21-2016, 05:11 AM
  4. Extract text to left of number of bracket
    By cmb80 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-22-2014, 06:57 PM
  5. How to extract the number initials found in one cell?
    By buzzbamm101 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-28-2013, 03:11 PM
  6. Extract number in the middle of text (check from right-to-left)
    By diywho in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-20-2012, 05:21 AM
  7. Using Left function to extract varying number of text
    By pvo2 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-11-2008, 01:30 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