+ Reply to Thread
Results 1 to 18 of 18

Replace/Remove exact words

  1. #1
    Forum Contributor
    Join Date
    07-12-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    136

    Replace/Remove exact words

    Hello!
    In my spread sheet i have Column D (doesn't have to be column specific) I need to remove all the cells containing these words:
    MAIL ORDER ITEMS (PACKAGE)
    STORE USE SUPPLIES
    CONTAINMENT - HOUSES
    How can this be done?
    ------
    ALSO I need to: I column A Can all these be done together instead of going to find/replace and one at a time? even if i can do Replace1 at once would cut my time down.
    Replace1: 9521,6580,6660,8570 with: 4546
    Replace2: 6560,6640 with: 8550
    Replace3: 6550, 6630 with: 8540

  2. #2
    Registered User
    Join Date
    01-23-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Replace/Remove exact words

    Would this be something you would have to always replace? Like a database?

  3. #3
    Forum Contributor
    Join Date
    07-12-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    136

    Re: Replace/Remove exact words

    its a spreadsheet i make to upload to my website to update my products.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Replace/Remove exact words

    if they are the same structure you can use advanced filter to get all rows in the column that have
    MAIL ORDER ITEMS (PACKAGE)
    STORE USE SUPPLIES
    CONTAINMENT - HOUSES
    Attached Files Attached Files
    Last edited by martindwilson; 07-29-2010 at 07:33 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Contributor
    Join Date
    07-12-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    136

    Re: Replace/Remove exact words

    thank you for the reply. The items I need to remove are in column D only, I am not sure how the advanced feature would help me remove all those items at once?

    I have this code for macro but how can i put more words into it to remove?

    Please Login or Register  to view this content.
    ----
    Also:
    I need to: I column A Can all these be done together instead of going to find/replace and one at a time?
    Replace: 9521,6580,6660,8570 with: 4546
    Replace: 6560,6640 with: 8550
    Replace: 6550, 6630 with: 8540
    Last edited by ryanb4614; 07-29-2010 at 08:36 PM.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Replace/Remove exact words

    1 Q at a time please!
    do you want to remove the whole row or just those cells in col D
    you can do the same with the numbers just make your criteria list the same as

    9521
    8570
    6580
    6660
    in a spare cell at top so it doesnt get filtered out put 4546
    apply advanced filter then copy 4546
    selected the filtered cells and paste
    Last edited by martindwilson; 07-29-2010 at 07:53 PM.

  7. #7
    Forum Contributor
    Join Date
    07-12-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    136

    Re: Replace/Remove exact words

    Well in column D I want to clear those cells and then delete the row those cells are in. Someone PM me with this code, but it freezes excell when i run it...

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by ryanb4614; 07-29-2010 at 08:25 PM.

  8. #8
    Registered User
    Join Date
    01-23-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Replace/Remove exact words

    Quote Originally Posted by ryanb4614 View Post
    Well in column D I want to clear those cells and then delete the row those cells are in. Someone PM me with this code, but it freezes excell when i run it...

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.


    I changed the range to "selection," just select the cells you want to replace and runt he macro

  9. #9
    Forum Contributor
    Join Date
    07-12-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    136

    Re: Replace/Remove exact words

    Thank you I can see that it worked but its frozen and its been 5 minutes since I ran it. There around about 10,000 row. Is this normal?

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Replace/Remove exact words

    if youd used the filter youd have been done by now lol

  11. #11
    Forum Contributor
    Join Date
    07-12-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    136

    Re: Replace/Remove exact words

    Quote Originally Posted by martindwilson View Post
    if youd used the filter youd have been done by now lol
    I just noticied there was an attachment. Okay I couldn't find out how to show everything then when they were removed. But I did data-> show all.. Thank you!

    Now how do I replace those numbers that I need replaced?
    Last edited by ryanb4614; 07-30-2010 at 06:51 AM.

  12. #12
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Replace/Remove exact words

    i said before do the same but on column with your numbers in this time.
    see my second last post
    essentially once filtered you can paste over the filtered list in one go. then repeat for the next list

    Replace: 6560,6640 with: 8550
    then again for third list
    Replace: 6550, 6630 with: 8540

  13. #13
    Forum Contributor
    Join Date
    07-12-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    136

    Re: Replace/Remove exact words

    Is there a fast way then to filter them out and paste over those numbers because theres about 1000+ of those numbers. I appreciate your help.

  14. #14
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Replace/Remove exact words

    depends if you only have those 3 groups it takes seconds

  15. #15
    Forum Contributor
    Join Date
    07-12-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    136

    Re: Replace/Remove exact words

    I cannot get it to work for the numbers. It words for the words, but when i run the numbers and click okay nothing is being shown....

  16. #16
    Forum Contributor
    Join Date
    07-12-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    136

    Re: Replace/Remove exact words

    scratch that i was putting a * after the number... THANK YOU!!

  17. #17
    Forum Contributor
    Join Date
    07-12-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    136

    Re: Replace/Remove exact words

    Quote Originally Posted by martindwilson View Post
    depends if you only have those 3 groups it takes seconds
    one problem i am running into, if I am trying to filter the word col i get collars, color, how do I make it specific?

  18. #18
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Replace/Remove exact words

    that gets a bit more complicated you have to use formulas to determine what to allow through the filter
    we can assume the text will be either of
    text space
    or space text space
    or space text
    then you make a function to cater for each in separate rows in adjacent columns
    but each one always refers to the first cell in the range you want filtered see attached
    edit i think i over complicated the formulas! replace them with
    =LEFT(A2,4)="col "
    and
    =ISNUMBER(SEARCH(" col ",A2))
    and
    =RIGHT(A2,4)=" col"
    Attached Files Attached Files
    Last edited by martindwilson; 07-31-2010 at 05:17 AM.

+ 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