+ Reply to Thread
Results 1 to 5 of 5

Use autofilter in macro and search after creteria

  1. #1
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Use autofilter in macro and search after creteria

    HI I am trying to get a macro to filter and delete rows after below creterias. I have found some but hope i can get one macro which can do it all.

    The creteria is following-.
    Column is from A to F. Starting with row 2 ( have headers.)
    First:
    Delete all rows which have no value in column D.
    Second:
    Delete all rows which dont have this text in column F "SENT" and "ARCHIVED"
    Third:
    Delete all rows which dont have the text string. "Hi and thanks for connecting to me. I would like to get in touch with you*" ( there is more text but i guess i can use * as wild card) This is in column D
    It has to be a macro and have to come in this order.

    Hope for some reply. Thanks in advance
    Sincerely
    Abjac

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Use autofilter in macro and search after creteria

    Based on what you say it makes no difference which order you carry out the above.

    Your data will be reduced to only those rows which
    - contain text "Hi and thanks...." in column D
    - and also contain either "SENT" or "ARCHIVED" in column F

    Please confirm this is what you expected

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Use autofilter in macro and search after creteria

    Hi Kev and thanks.
    I actually have macros who do what i want or i found out later. . The thing is its very clumsy solution. But it works ok . The third condition in my macroes is changed a little instead of keep the ones with SENT and Archived. I delete the rows with the word INBOX. I would like if some could short it down. So i will put them here.
    Have a look.
    Sincerely
    Abjac

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Use autofilter in macro and search after creteria

    Test with copy of your data!

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Use autofilter in macro and search after creteria

    HI Kev. I just checked it it works like a charm. So just perfect thanks alot for your help.

    Sincerely
    Abjac

+ 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. Autofilter in macro
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-08-2018, 03:56 PM
  2. Code to filter and search for creteria and cut and paste to another tab
    By robertguy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-20-2014, 04:35 AM
  3. VBA Macro To Search Autofilter
    By alulla in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2013, 11:56 AM
  4. [SOLVED] Macro autofilter based on search
    By Flatdown in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-17-2012, 03:42 AM
  5. Search mechanasim IN EXCEL with dynamic creteria
    By dipesh4uin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-02-2012, 05:03 PM
  6. Vlookup or macro for multiple creteria
    By Wskip49 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2008, 09:51 AM
  7. Macro to search based on creteria cut and paste
    By kish_gv in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-04-2007, 06:41 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