+ Reply to Thread
Results 1 to 6 of 6

Removing text and dashes CB-PC-150

  1. #1
    Registered User
    Join Date
    08-28-2006
    Posts
    14

    Removing text and dashes CB-PC-150

    I have thousands of items with boxes that have NBC-AB-440 and ABC-EA-150E, etc. I want to be able to remove the dashes and the first two parts of text (the NBC-AB- & ABC-EA-) so that I am just left with "440" & "150"

    Thank you

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    This works for your two examples

    =MID(A1,8,3)
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    08-28-2006
    Posts
    14

    Thank you

    OK... so close...

    But how do I get the cell to recognize the new value and not the formula?

    I need to compare the last part of the text ("106" compared to "ABC-CE-106")

    These I need to sort in a new way. I am trying to avoid having to sit and manually delete "ABC-CE-" from every line. Not every line starts with "ABC-CE-".

    Thank you
    Last edited by jonasmacs; 09-13-2008 at 03:18 PM. Reason: not working as I want it to

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Not using formulas also consider Data - Text to columns - Check "delimited" - check others and enter "-" ( no quotes)

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Quote Originally Posted by jonasmacs View Post
    OK... so close...

    But how do I get the cell to recognize the new value and not the formula?

    I need to compare the last part of the text ("106" compared to "ABC-CE-106")

    These I need to sort in a new way. I am trying to avoid having to sit and manually delete "ABC-CE-" from every line. Not every line starts with "ABC-CE-".

    Thank you
    Select the column with formula and then copy > right click > paste special > values.

    HTH

    VBA Noob

  6. #6
    Registered User
    Join Date
    08-28-2006
    Posts
    14

    Duh

    Thank you. I remember that now. Silly...

    Thank you for your help

+ 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. extracting text from a cell
    By ssim in forum Excel General
    Replies: 2
    Last Post: 09-10-2008, 08:26 PM
  2. sorting numbers with letters and dashes
    By IcantdoIt in forum Excel General
    Replies: 5
    Last Post: 08-21-2008, 09:57 AM
  3. Adding numbers with dashes
    By boyaco in forum Excel General
    Replies: 5
    Last Post: 02-19-2008, 01:00 PM
  4. cell entry restricted to text, 2-3 letters & uppercase
    By whitSC in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-20-2007, 03:30 PM

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