+ Reply to Thread
Results 1 to 10 of 10

Need to trim various prefixed that are in ALL CAPS off of the front of text in a column

  1. #1
    Registered User
    Join Date
    02-07-2012
    Location
    LA
    MS-Off Ver
    Excel For Mac 2011
    Posts
    99

    Question Need to trim various prefixed that are in ALL CAPS off of the front of text in a column

    We have song titles in a column that have ALL CAPS prefixes that we use internally to identify the writer/origin of the song. For example:

    RSCAT TR Let the Sun Shine In
    RSC GHT Night Runner
    RD FGH Midnight Mountain


    I need to trim the ALL CAPS gibberish off of the front of the titles , leaving simple "Let The Sun Shine In" etc

    I have this formula (below) for trimming around a common cluster of characters. Could I play off of this somehow and trim ALL CAPS characters from the Beginning? Any help is much appreciated

    =TRIM(LEFT(N2,FIND(" -by- ",N2)-2))
    Last edited by syncguy; 10-15-2013 at 06:03 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,621

    Re: Need to trim various prefixed that are in ALL CAPS off of the front of text in a colum

    Here's a small function:
    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need to trim various prefixed that are in ALL CAPS off of the front of text in a colum

    In the posted samples the data you want starts after the 2nd space character.

    Will that always be the case?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    02-07-2012
    Location
    LA
    MS-Off Ver
    Excel For Mac 2011
    Posts
    99

    Re: Need to trim various prefixed that are in ALL CAPS off of the front of text in a colum

    Yes Tony , thanks

  5. #5
    Registered User
    Join Date
    02-07-2012
    Location
    LA
    MS-Off Ver
    Excel For Mac 2011
    Posts
    99

    Re: Need to trim various prefixed that are in ALL CAPS off of the front of text in a colum

    Thank you much protonLeah. But how do you implement this type of function ? I only know formulas that begin with '=' . I guess I'm a beginner still


    Quote Originally Posted by protonLeah View Post
    Here's a small function:
    Please Login or Register  to view this content.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need to trim various prefixed that are in ALL CAPS off of the front of text in a colum

    Try this...

    Data Range
    A
    B
    2
    RSCAT TR Let the Sun Shine In
    Let the Sun Shine In
    3
    RSC GHT Night Runner
    Night Runner
    4
    RD FGH Midnight Mountain
    Midnight Mountain

    This formula entered in B2 and copied down:

    =MID(A2,FIND(" ",A2,FIND(" ",A2)+1)+1,100)

  7. #7
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,621

    Re: Need to trim various prefixed that are in ALL CAPS off of the front of text in a colum

    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    Withe list in column N select the column you want the results in, say column R. Then in R2 enter: =StripCaps(N2) and drag down as needed.

  8. #8
    Registered User
    Join Date
    02-07-2012
    Location
    LA
    MS-Off Ver
    Excel For Mac 2011
    Posts
    99

    Re: Need to trim various prefixed that are in ALL CAPS off of the front of text in a colum

    THANKS protonLeah !

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

    Re: Need to trim various prefixed that are in ALL CAPS off of the front of text in a colum

    just coz i did it this array finds the first lower case letter and returns the string starting one letter earlier
    so will work for any number of leading uppercase
    =MID(A1,MIN(FIND(CHAR(ROW($A$97:$A$122)),A1&"abcdefghijklmnopqrstuvwxyz"))-1,255)
    "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

  10. #10
    Registered User
    Join Date
    02-07-2012
    Location
    LA
    MS-Off Ver
    Excel For Mac 2011
    Posts
    99

    Re: Need to trim various prefixed that are in ALL CAPS off of the front of text in a colum

    Awesome thanks martindwilson!

+ 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. search and trim text in column
    By aarodn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-26-2013, 04:59 PM
  2. Changing text from all CAPS to Caps
    By Hook in forum Excel General
    Replies: 6
    Last Post: 04-23-2009, 11:03 AM
  3. Replies: 3
    Last Post: 06-17-2008, 08:57 PM
  4. [SOLVED] fix all caps text to first letter caps
    By MBartine in forum Excel General
    Replies: 1
    Last Post: 08-07-2006, 10:05 PM
  5. Replies: 10
    Last Post: 03-17-2006, 07:10 PM

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