+ Reply to Thread
Results 1 to 11 of 11

Removing text from cells automatically

  1. #1
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Asia
    MS-Off Ver
    Microsoft 365
    Posts
    234

    Removing text from cells automatically

    Hi

    I have the following text in cell A1
    AAA - BBB

    I would like to have a formula in another cell that returns
    BBB

    What formula should I use?

    thanks

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

    Re: Removing text from cells automatically

    Maybe this...

    =RIGHT(A1,3)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Asia
    MS-Off Ver
    Microsoft 365
    Posts
    234

    Re: Removing text from cells automatically

    Thanks for the reply. I need a more generic formula as sometimes there are more than three characters after the hyphen and space and sometimes more than three characters before.

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

    Re: Removing text from cells automatically

    Would it be safe to say that you want to extract the last "word" in the string? Extract everything after the last space?

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

    Re: Removing text from cells automatically

    Maybe this...

    =TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",50)),50))

  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: Removing text from cells automatically

    Or try this one.
    Enter formula in cell B1 and pull it to the right until you see blanks and then down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C D
    1 AAA - BBB AAA BBB
    2 AAA - BBB - CCCC AAA BBB CCCC
    3 ADDD - BB - CCCC ADDD BB CCCC
    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

  7. #7
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Asia
    MS-Off Ver
    Microsoft 365
    Posts
    234

    Re: Removing text from cells automatically

    I would like to extract the string of words after the hyphen and space. thanks.

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

    Re: Removing text from cells automatically

    Does the formula in post #5 do what you want?

    If not, post SEVERAL examples of what your data looks like.
    Last edited by Tony Valko; 08-08-2016 at 07:36 PM.

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Removing text from cells automatically

    Quote Originally Posted by L.LEE View Post
    I would like to extract the string of words after the hyphen and space. thanks.
    Try this:

    =RIGHT(A1,LEN(A1)-FIND("-",A1)-1)

    assuming your text is in A1.

    Hope this helps.

    Pete

  10. #10
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Asia
    MS-Off Ver
    Microsoft 365
    Posts
    234

    Re: Removing text from cells automatically

    Thanks Tony. The formula given by Pete_UK works.

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

    Re: Removing text from cells automatically

    Here's another one that's a few keystrokes shorter...

    =MID(A1,FIND("-",A1)+2,50)

+ 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. Removing text from cells
    By Kfearer in forum Excel General
    Replies: 6
    Last Post: 01-22-2015, 05:30 PM
  2. Removing certain text in several cells
    By cloudwalking in forum Excel General
    Replies: 4
    Last Post: 01-03-2013, 02:23 PM
  3. Cells have Numbers & Text (NEED TEXT REMOVING)
    By michaelrusk in forum Excel General
    Replies: 3
    Last Post: 12-05-2012, 06:57 AM
  4. Excel 2007 : Removing Text from Cells
    By Randy Putman in forum Excel General
    Replies: 4
    Last Post: 11-07-2011, 06:44 PM
  5. Removing/Adding text to cells
    By farzyness in forum Excel General
    Replies: 4
    Last Post: 08-12-2010, 04:26 PM
  6. Automatically Removing Rows where Cells A:R are Blank
    By DukeDevil in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-29-2006, 04:35 PM
  7. [SOLVED] Adding and removing text within cells
    By Annie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-24-2006, 01:20 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