+ Reply to Thread
Results 1 to 12 of 12

Extract a part of a text string

  1. #1
    Registered User
    Join Date
    10-24-2006
    Posts
    21

    Extract a part of a text string

    Hello!!!!!
    Last edited by MaxAlbertsson; 07-29-2007 at 11:50 AM.

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Here's one way. If you have your text in A1, then put this in B1

    =VALUE(LEFT(A1,FIND("x",A1,1)-1)) then this in C1

    =VALUE(MID(A1,FIND("x",A1,1)+1,FIND("x",A1,FIND("x",A1,1)+1)-FIND("x",A1,1)-1)) then this in D1

    =VALUE(MID(A1,FIND("x",A1,FIND("x",A1,1)+1)+1,10))

    All your thickness's, lenght's and width's are now in separate cells - Merry Christmas
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    If you download Morefunc add-in you could use the EVAL function, i.e.

    =EVAL(SUBSTITUTE(A1,"x","*"))

    For morefunc see here

    http://xcell05.free.fr/

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Of course another way is to select the cells and go to Data > Text to columns, then pick Delimited > Next, Tab, Other and put in an "x"
    This will separate into separate cells also.

  5. #5
    Registered User
    Join Date
    12-26-2006
    Posts
    4

    Thumbs up Thanks Old Chippy

    thanks alot old chippy, the functions is very useful indeed, it does what i wanted to do.
    I have another request for you, would mind explaining the function abit don't really understand, im noobie in tis function things. because eventhough it can does wut i want it to do, but i don understand what the function is telling. for example the part where the minus symbol turn up.

    thanks alot .

    hopefully i don;t confuse you. Sorry for the bother i cause.

    Angeluz.

  6. #6
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Angeluz
    thanks alot old chippy, the functions is very useful indeed, it does what i wanted to do.
    I have another request for you, would mind explaining the function abit don't really understand, im noobie in tis function things. because eventhough it can does wut i want it to do, but i don understand what the function is telling. for example the part where the minus symbol turn up.

    thanks alot .

    hopefully i don;t confuse you. Sorry for the bother i cause.

    Angeluz.
    Hi,

    oldchippy's formula

    =VALUE(LEFT(A1,FIND("x",A1,1)-1)) then this in C1

    =VALUE(MID(A1,FIND("x",A1,1)+1,FIND("x",A1,FIND("x ",A1,1)+1)-FIND("x",A1,1)-1)) then this in D1

    =VALUE(MID(A1,FIND("x",A1,FIND("x",A1,1)+1)+1,10))


    is to use the left or middle characters according to the position of the 'x' character(s) -1 to get before the x, +1 to get the characters after the x

    thus the first is Left A1 up to the character before the x
    the second 'Mid' uses the find 3 times to locate the centre characters,
    and the last finds the character after the 2nd x (with the +1) and goes from there to the end (providing the end is within 10 characters.

    Hope this helps.
    ---
    Si fractum non sit, noli id reficere.

  7. #7
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Quote Originally Posted by Angeluz
    thanks alot old chippy, the functions is very useful indeed, it does what i wanted to do.
    I have another request for you, would mind explaining the function abit don't really understand, im noobie in tis function things. because eventhough it can does wut i want it to do, but i don understand what the function is telling. for example the part where the minus symbol turn up.

    thanks alot .

    hopefully i don;t confuse you. Sorry for the bother i cause.

    Angeluz.
    Here's a complete breakdown on how you can build up complete formulas
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    12-26-2006
    Posts
    4

    Thumbs up Thanks fellow forumers

    Thank you both of you.

    Fantastic even though, i haven't read yet, i think you guys have offer much help already. easier to understand then books certainly,

    thanks mates.

  9. #9
    Registered User
    Join Date
    12-26-2006
    Posts
    4

    Question Another question.

    Its me again guys, ( and gals )

    Another question for you guys, nice explaination OLdChippy, detail and easy to understand, not to forget, to bryan hessey also, for explaination.
    Thanks alot to both of you.
    Need help from you all again.

    Here goes my question, if i were to extract from A1 i use that formula, but what happens to A2, A3 and till A1000.

    Is there a way other than avoiding to change to formula one by one, because one thousand is massive.

    Should it be a general formula, for the whole column or , is there somehting that will automatic change the A1 to A2 to A3 accordingly.

    And another question, how can i put one same formula in one whole column without, inserting the formula one by one.

    Sorry if my question is confusing, still learning english in process.

    Thanks in advance.
    Last edited by Angeluz; 12-27-2006 at 02:48 AM.

  10. #10
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hello again Angeluz,

    What you need is the fill-handle to copy your formula down. If you have your data in column A and your formula in B1, you can use the fill-handle to copy that formula down column B as far as you need. See link on fill-handle

    http://www.mvps.org/dmcritchie/excel/fillhand.htm

  11. #11
    Registered User
    Join Date
    12-26-2006
    Posts
    4

    Thumbs up Thanks

    thanks again, so easy yet i missed it, lol darn noob me.

  12. #12
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Glad you're sorted - thanks for the feedback

+ 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