+ Reply to Thread
Results 1 to 8 of 8

Replacing a sentence ending to a character

  1. #1
    Registered User
    Join Date
    07-14-2009
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    52

    Wink Replacing a sentence ending to a character

    When I want to replace a content ending to e.g.">"; I replace "*>" with nothing

    but if there is two > in the cell, it will deletes the content up to the second >; how I can delete the content to the first > only?

    For example in the content

    word1 word2 > word3 word 4 > word5 > word 6

    how I can replace (or delete) only "word1 word2" ?

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Replacing a sentence ending to a character

    Is this what you want?

    =SUBSTITUTE(A1,LEFT(A1,FIND(">",A1)+1),"")

  3. #3
    Registered User
    Join Date
    07-14-2009
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    52

    Thumbs up Re: Replacing a sentence ending to a character

    Quote Originally Posted by rocky1 View Post
    Is this what you want?

    =SUBSTITUTE(A1,LEFT(A1,FIND(">",A1)+1),"")
    It worked perfect, but can you tell me about other cases

    1. Replace "word3 word4"
    2. Replaced "word3 word4 > word5"
    3. Replace "word6"

    Thanks

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Replacing a sentence ending to a character

    I'm not sure I fully understand.

    This is what we started with >> word1 word2 > word3 word 4 > word5 > word 6

    You first asked remove word1 word2, but now there is another requirement...

    What do you want to end up with?

  5. #5
    Registered User
    Join Date
    07-14-2009
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Replacing a sentence ending to a character

    Quote Originally Posted by rocky1 View Post
    I'm not sure I fully understand.

    This is what we started with >> word1 word2 > word3 word 4 > word5 > word 6

    You first asked remove word1 word2, but now there is another requirement...

    What do you want to end up with?
    You answer my first question fully; but as your solution is flexible, I am asking for new questions. I wanted to open a new thread for new questions, but I thought it is better to continue it here.

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Replacing a sentence ending to a character

    Okay so what is the new question?

  7. #7
    Registered User
    Join Date
    07-14-2009
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Replacing a sentence ending to a character

    In the content word1 word2 > word3 word 4 > word5 > word 6

    1. Replace "word3 word4" (words at the middle)
    2. Replaced "word3 word4 > word5" (words at the middle with the character)
    3. Replace "word6" (words at the end)

  8. #8
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Replacing a sentence ending to a character

    Number 3 I can probably figure out, but #1 and #2 will take a little longer if I can even figure it out.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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