+ Reply to Thread
Results 1 to 4 of 4

UDF to isolate certain character sets

  1. #1
    Registered User
    Join Date
    07-09-2012
    Location
    Ann Arbor, MI, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    UDF to isolate certain character sets

    I have a number of rows of data that I need to truncate, similar to the following:

    PF-CSD-1881-24.8G
    PF-WT-26MM-21G
    PF-WT-26MM-26.2G
    PF-WT-26MM-32.4G

    I want the UDF to return the following:

    24.8
    21
    26.2
    32.4

    Any thoughts on how best to get rid of the G at the end (easy part) and then remove up through the last hyphen? I tried combinations of left, right, mid, find, and len and couldn't get it right without using a macro but am stuck and confused. Thanks for any help you can provide!

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,767

    Re: UDF to isolate certain character sets

    Using worksheet functions...

    In A1 cell
    PF-CSD-1881-24.8G

    In B1 cell
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: UDF to isolate certain character sets

    try it
    Please Login or Register  to view this content.
    for example, in A3 "PF-CSD-1881-24.8G" and in B3
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-19-2013
    Location
    Honolulu
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: UDF to isolate certain character sets

    This may also work...

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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