+ Reply to Thread
Results 1 to 12 of 12

How to strip text from a cell

  1. #1
    Registered User
    Join Date
    04-12-2010
    Location
    Surrey
    MS-Off Ver
    Excel 2007
    Posts
    26

    How to strip text from a cell

    Hello,

    I have hundreds of rows of text that all have a unique ID. What I mean is each cell has a name and then before the extension has a ^PRP######. These are all filenames with a unique id attached before the extension.

    What i wanted is to strip the ^PRP###### from each cell

    is that possible?

    thanks (see attached)
    Attached Files Attached Files
    Last edited by gurp99; 01-29-2011 at 06:39 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,083

    Re: How to strip text from a cell

    maybe this:

    =MID(A1, FIND("^PRP", A1&"^PRP"), 100)
    Never use Merged Cells in Excel

  3. #3
    Forum Contributor
    Join Date
    02-14-2007
    Location
    Chester, England
    MS-Off Ver
    2010 & 2016
    Posts
    312

    Re: How to strip text from a cell

    This formula copied down should do what you need....

    =LEFT(A1,FIND("^",A1)-1)

    Cheers

    Jim

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to strip text from a cell

    if you want to remove the last bit then just find ^* replace with nothing
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    04-12-2010
    Location
    Surrey
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: How to strip text from a cell

    I actually needed to keep the extension. Thats the problem I was having, how can i just strip the Unqiue ID and leave the extension there?

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to strip text from a cell

    find ^????????? replace with nothing

  7. #7
    Registered User
    Join Date
    04-12-2010
    Location
    Surrey
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: How to strip text from a cell

    Quote Originally Posted by martindwilson View Post
    find ^????????? replace with nothing
    yes that is correct

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to strip text from a cell

    that's it do just that
    the ?? are wild cards and i assumed you always had a 9 digit number hence 9 times?
    so in find put
    ^?????????
    replace with nothing

  9. #9
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: How to strip text from a cell

    =RIGHT(A1,LEN(A1)-FIND("^",A1)) and drag down
    Windows 7 using Office 2007 & 2010

    Remember your [ code ] [ /code ] tags, makes reading soooo much easier

  10. #10
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: How to strip text from a cell

    with your sample.....is this what you're looking for?
    Attached Files Attached Files

  11. #11
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: How to strip text from a cell

    Just realized you would like to keep this ^ as well as the number the attached does that
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    04-12-2010
    Location
    Surrey
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: How to strip text from a cell

    Quote Originally Posted by martindwilson View Post
    that's it do just that
    the ?? are wild cards and i assumed you always had a 9 digit number hence 9 times?
    so in find put
    ^?????????
    replace with nothing
    That actually works perfectly

    thank you

+ 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