+ Reply to Thread
Results 1 to 6 of 6

extract a value from a cell

Hybrid View

  1. #1
    Registered User
    Join Date
    09-27-2018
    Location
    london
    MS-Off Ver
    excel
    Posts
    69

    extract a value from a cell

    Hi,

    I have got a cell with content of texts and values and wish to extract a value from it

    I have attached a sample for clarity

    Thanks

    Vito
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: extract a value from a cell

    Hi vito,

    See if this works for you.

    Extract Value from String with -SERV.xlsx

    If not then give more examples of your strings.

    Edit: I had to see how "pretty" my formula was. It looks like this:
    Formula: copy to clipboard
    =TRIM(RIGHT(SUBSTITUTE(TRIM(MID(B3,FIND("-",B3)-15,15))," ",REPT(" ",50)),50)) 
    Last edited by MarvinP; 08-07-2019 at 06:24 PM.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    09-27-2018
    Location
    london
    MS-Off Ver
    excel
    Posts
    69

    Re: extract a value from a cell

    hey thanks, it works great!!!!

  4. #4
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: extract a value from a cell

    I don't know if it's the most efficient formula [EDIT: Marvin's is prettier], but I think this will work in D3:

    =MID(B3,FIND("@",SUBSTITUTE(LEFT(B3,SEARCH(",",B3))," ","@",LEN(LEFT(B3,SEARCH(",",B3)))-LEN(SUBSTITUTE(LEFT(B3,SEARCH(",",B3))," ",""))))+1,SEARCH(",",B3)-FIND("@",SUBSTITUTE(LEFT(B3,SEARCH(",",B3))," ","@",LEN(LEFT(B3,SEARCH(",",B3)))-LEN(SUBSTITUTE(LEFT(B3,SEARCH(",",B3))," ",""))))+2)

    Fill down as needed. It is predicated upon finding the first comma and returning everything from the preceding space through two characters after the first comma. As long as column B fits that mold, it should work.

    Note that Excel will recognize the result in D3 as a text string, but you can add a "+0" should you need it be recognized as a number.
    If your problem has been solved, please use "Thread Tools" to mark the thread as "Solved".

    If you're grateful for this site's existence and would like to contribute to the community, please consider posting something hilarious in our joke thread:
    https://www.excelforum.com/the-water...ke-thread.html

  5. #5
    Registered User
    Join Date
    09-27-2018
    Location
    london
    MS-Off Ver
    excel
    Posts
    69

    Re: extract a value from a cell

    hey, and if I need to select the second value after the text "-SERV"?

  6. #6
    Forum Contributor
    Join Date
    12-13-2013
    Location
    Calgary,AB,Canada
    MS-Off Ver
    2016,O365
    Posts
    236

    Re: extract a value from a cell

    D3=TRIM(MID(SUBSTITUTE($B3," ",REPT(" ",50)),FIND("^",SUBSTITUTE(SUBSTITUTE($B3," ",REPT(" ",50)),",","^",COLUMN(A1)))-20,50))

    copy to right to extract the 2nd,3rd,4th....*,* value (if has)

+ 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 and copy cell data to another cell if it matches criteria
    By volleyballtigger in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 10-24-2017, 12:55 PM
  2. [SOLVED] extract number from cell contain text and count of non empty cell
    By mazan2010 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-03-2017, 01:17 PM
  3. [SOLVED] How to extract text data from one cell based on the date on another cell?
    By Prabhu.nanda in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-11-2013, 08:46 AM
  4. Replies: 5
    Last Post: 01-10-2013, 09:51 AM
  5. Replies: 12
    Last Post: 09-15-2012, 10:20 PM
  6. Replies: 3
    Last Post: 07-25-2012, 07:54 AM
  7. Replies: 0
    Last Post: 05-05-2011, 06:41 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