+ Reply to Thread
Results 1 to 5 of 5

Find and remove ONLY certain characters

  1. #1
    Registered User
    Join Date
    10-19-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Find and remove ONLY certain characters

    I understand VB fairly well but when it comes to VB/Macros in excel I know pretty much nothing. Basically I have different variations that have different descriptions, but they all have the sizes within the description. I need to get the sizes from the descriptions but doing it manually would take to long as there's over 10,000 variations.

    Example:

    Description
    ORFS STR 1"-14*T.3/8" FEM

    What I want to get out
    1"-14*T.3/8"
    Last edited by NBVC; 10-20-2011 at 07:50 AM.

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

    Re: Find and remove ONLY certain characters

    Can you give more samples and/or can you tell us if there is a pattern.. like 2 words, string of interest, one word... or are there other variations?

    Also, if it is possible to do with a formula instead of VBA, is that of interest?
    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
    Registered User
    Join Date
    10-19-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Find and remove ONLY certain characters

    Unfortunately there is no pattern with the variations, hence why I thought I'd see if anyone on here knew. It doesn't really matter whether its VB or a formula, just something that works would be good .

    Here is a couple more examples:
    1" BSP MALE/FEMALE 90 ROTARY COUPLING
    ORFS. 90 1.7/16"-12*T.1" FEM
    90° FEM.ORFS Female 1.11/16"-12*T.1"
    1.7/16" ORFS PLUG

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

    Re: Find and remove ONLY certain characters

    Ok, here is a two step formula..

    Assuming the text starts in A1, then in B1, intermediate step:

    Please Login or Register  to view this content.
    and in C1, final step:

    Please Login or Register  to view this content.
    copied down

    You can, if you want sub all the B1's in the C1 formula with the B1 formula to get only 1 formula, but it is alot of needless recalcs...

  5. #5
    Registered User
    Join Date
    10-19-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Find and remove ONLY certain characters

    Thanks for the help, unfortunately it didn't really do what I wanted but I managed to make a script in VB instead. Thanks for the help anyway, I'll put the code I made below in case it helps anyone else.

    Please Login or Register  to view this content.
    Last edited by Philak; 10-20-2011 at 06:00 AM.

+ 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