+ Reply to Thread
Results 1 to 6 of 6

Formula to extract data from the middle of a cell.

  1. #1
    Forum Contributor
    Join Date
    01-14-2011
    Location
    New York City, USA
    MS-Off Ver
    Excel 2010
    Posts
    194

    Formula to extract data from the middle of a cell.

    Hello,

    I need to extract the text contents from the middle of a data string? Is there a way to subtract both sides from each other because I can write a formula for that. The data in the middle is different for every cell but it's the similar enough on each side that I can write a formula on it.
    Last edited by SEMMatt; 11-21-2011 at 06:21 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula to extract data from the middle of a cell.

    Can you supply some examples of raw data and what you want to extract?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    01-14-2011
    Location
    New York City, USA
    MS-Off Ver
    Excel 2010
    Posts
    194

    Re: Formula to extract data from the middle of a cell.

    Quote Originally Posted by NBVC View Post
    Can you supply some examples of raw data and what you want to extract?
    Sure! So for example I have these cells

    VIM_20110505_B_BreakOut_160x600_FLA_GA.swf
    VIM_20110525_B_Wings_160X600_FLA_GA.swf
    VIM_20110603_B_SC_Flip_160x600_FLA_GA.swf

    in which case I need to see BreakOut, Wings and SC_Flip

    Thanks!

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Formula to extract data from the middle of a cell.

    In those examples the data you want always starts at character 16 and then runs until the next underscore, for that try this formula for data in A1

    =MID(A1,16,FIND("_",A1,17)-16)
    Audere est facere

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula to extract data from the middle of a cell.

    I am not sure of the consistency of the data.. but I am off now.. so I will leave you with this and hopefully it works for you...

    =TRIM(SUBSTITUTE(UPPER(MID(A1,16,255)),"_160X600_FLA_GA.SWF",""))

    or

    =LEFT(MID(A1,16,255),LEN(MID(A1,16,255))-19)

    where A1 contains first original string...

  6. #6
    Forum Contributor
    Join Date
    01-14-2011
    Location
    New York City, USA
    MS-Off Ver
    Excel 2010
    Posts
    194

    Re: Formula to extract data from the middle of a cell.

    Thanks guys, I tried all of them and they all work!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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