+ Reply to Thread
Results 1 to 7 of 7

Find and Delete Phrases

  1. #1
    Registered User
    Join Date
    10-29-2021
    Location
    USA
    MS-Off Ver
    O365
    Posts
    51

    Find and Delete Phrases

    Hello everyone. What would be the easiest way to find the below phrases in columns C (First Name), D (Middle Name), E (Last Name) and delete them? For example suppose along those three columns I had:
    Column C - John
    Column D - J.
    Column E - Doe AIF, CFA(R)

    But I needed it to be:
    Column C - John
    Column D - J
    Column E - Doe

    Is there a single formula that can do this? Note the very last one is a double space:

    ,
    .
    (
    )
    %
    &
    (HOS)
    (R)
    AIF
    CFA
    CFP
    CHFC
    CLU
    CPA
    PFS
    Attached Files Attached Files
    Last edited by mightymo77; 01-20-2022 at 10:18 AM.

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Find and Delete Phrases

    Maybe you can use UDF like this:

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


    A
    B
    C
    1
    (HOS) ()John J. Doe AIF, CFA(R) John J Doe
    2
    (R) =MyNewWord(A1:A16,B1)
    3
    AIF
    4
    CFA
    5
    CFP
    6
    CHFC
    7
    CLU
    8
    CPA
    9
    PFS
    10
    11
    ,
    12
    .
    13
    (
    14
    )
    15
    %
    16
    &


    or through columns. But loop through 3 columns (I do not know how many rows you expect to check) and search in values 15 strings to replace take a while.

    Please Login or Register  to view this content.
    or somebody find something faster.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Find and Delete Phrases

    or...


    A picture is worth 1,000 words. An Excel sheet is worth 1,000 non-editable pictures.

    Please read the yellow banner about sample worksheets, at the top of the screen. Act on its guidelines and post a SMALL sample sheet, with representative samples, an explanation and some expected results.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    10-29-2021
    Location
    USA
    MS-Off Ver
    O365
    Posts
    51

    Re: Find and Delete Phrases

    Thank you very much KOKOSEK. I edited my first post to be more clear. The columns C, D, E are actually three columns of First, Middle, Last Name, it comes this way when exported from the database. My goal is to find those phrases listed and delete them to clean up the names.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Find and Delete Phrases

    Hi. Provide SEVERAL representative examples (not just one) on an Excel sheet please!!!

  6. #6
    Registered User
    Join Date
    10-29-2021
    Location
    USA
    MS-Off Ver
    O365
    Posts
    51

    Re: Find and Delete Phrases

    OK I have attached an example on my first post above.
    Last edited by mightymo77; 01-20-2022 at 12:26 PM.

  7. #7
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Find and Delete Phrases

    Quote Originally Posted by mightymo77 View Post
    I edited my first post to be more clear. The columns C, D, E are actually three columns of First, Middle, Last Name, it comes this way when exported from the database. My goal is to find those phrases listed and delete them to clean up the names.
    It does not change anything.
    You can use UDF somewhere (other sheet called 'ClearData' or other columns to get clear data).
    Or looping through C/D/E and check. Of course can be auto declared as Range("C1:E" & lastRow).
    But as I said simple loop takes a while if you got lots of rows to check.

    EDIT: Change this line into
    Please Login or Register  to view this content.
    Last edited by KOKOSEK; 01-20-2022 at 10:26 AM.

+ 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. [SOLVED] find a text in a range, delete it and delete the value in cell to its left
    By snkhan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-12-2020, 07:18 PM
  2. Replies: 0
    Last Post: 03-06-2017, 06:58 PM
  3. index(match) and find phrases
    By dgrayexcel in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 01-29-2016, 06:41 PM
  4. Find Phrases and copy text in between
    By Cbaffoni87 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-07-2015, 03:45 PM
  5. [SOLVED] Can I find duplicate phrases (not just occurrences of single words)?
    By michigandrea in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 04-17-2014, 09:06 AM
  6. Want to delete every worksheet that *doesn't* contain one of several phrases
    By Televangelist in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-08-2011, 11:29 AM
  7. Compare lists of phrases in two workbooks and import only missing phrases
    By Fireblejd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-10-2011, 06:59 AM

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