+ Reply to Thread
Results 1 to 3 of 3

Removing text from a string if present, otherwise leave as-is

  1. #1
    Registered User
    Join Date
    03-19-2009
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2011
    Posts
    37

    Removing text from a string if present, otherwise leave as-is

    Hi all,

    I am trying to write a formula to remove the <!000> or similar from a column of entries. The problem is sometimes the <!000> is present and sometimes it isn't.


    Here is an example of what is in column B:
    <!080>example 1
    <!090>example 11
    <!100>example 111
    <!110>example 2
    example 22
    example 211

    I would like the end result in column A to be:
    example 1
    example 11
    example 111
    example 2
    example 22
    example 211

    Is there an easy way to do this?

    Thanks so much!

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Removing text from a string if present, otherwise leave as-is

    Why not just apply Find & Replace ?

    Find What: <*>
    Replace With: leave blank

    (Copy B to A and apply above if needed)

    edit: - if you are adamant you want a formula

    A1: =IF(LEFT(B1)="<",REPLACE(B1,1,FIND(">",B1),""),B1)

    assumes where there's > there's <

  3. #3
    Registered User
    Join Date
    03-19-2009
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2011
    Posts
    37

    Re: Removing text from a string if present, otherwise leave as-is

    This works great!
    Can't believe I didn't think of it...


    edit- the formula works great too!

    Thanks so much!
    Last edited by wace; 08-19-2010 at 09:04 AM.

+ 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