+ Reply to Thread
Results 1 to 8 of 8

Trim left, but only if the first 3 character start with "The"

  1. #1
    Registered User
    Join Date
    03-25-2014
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    7

    Trim left, but only if the first 3 character start with "The"

    Hello

    banging my head on the key board..............

    I have a column of company names - if the name begins with "The" I would like to trim the cell

    ie..."The Sherwin-Williams Company" would become "Sherwin-Williams Company"

    I thought this would work, but there is an error I cannot find

    =LEFT(A1,LEN(A1)-(EXACT(RIGHT(A1),"S")))&IF(RIGHT(A1,1)="The")

    Any help would be greatly appreciated.

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Trim left, but only if the first 3 character start with "The"

    Try this

    =SUBSTITUTE(A1,"The ","")
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Trim left, but only if the first 3 character start with "The"

    This might work for you:

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

  4. #4
    Registered User
    Join Date
    03-25-2014
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Trim left, but only if the first 3 character start with "The"

    Hello

    Thanks for the reply - my concern is would this not remove all of the "The" from a given cell - I only want "The remove if it is the first 3 characters

  5. #5
    Registered User
    Join Date
    03-25-2014
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Trim left, but only if the first 3 character start with "The"

    Newdoverman - worked perfect! Thanks!

    Comment about the concern was for AlKey

    Issue is resolved!

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Trim left, but only if the first 3 character start with "The"

    Then this

    =IF(LEFT(A1,3)="The",SUBSTITUTE(A1,"The ",""),A1)

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Trim left, but only if the first 3 character start with "The"

    Thank you for the feedback.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Trim left, but only if the first 3 character start with "The"

    Or this

    =IF(LEFT(A1,3)="The",REPLACE(A1,1,4,""),A1)

+ 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. replace all defined range names in the sheet that start with "Street" to "Road"
    By matrex in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-04-2016, 08:53 AM
  2. Replies: 6
    Last Post: 03-07-2014, 10:34 PM
  3. Adding multiple "find" with "left" /"Right"
    By Daniel1 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 02-22-2014, 04:33 PM
  4. Rearrange format with "TRIM" and "SUBTRACT" functions
    By Vittorio in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2011, 07:37 PM
  5. Replies: 5
    Last Post: 06-26-2006, 09:23 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