+ Reply to Thread
Results 1 to 5 of 5

Need a macro to delete all rows not meeting a criteria in column A

  1. #1
    Registered User
    Join Date
    06-07-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    72

    Need a macro to delete all rows not meeting a criteria in column A

    I need a macro that will delete all rows that don't have Ye in column A. This Macro would apply to columns A, B, & C from row 2 down.

    Thanks!

    Example of what I want:
    MACRO EXAMPLE.xlsx

  2. #2
    Forum Contributor day92's Avatar
    Join Date
    04-20-2010
    Location
    Los Angeles
    MS-Off Ver
    Excel 360
    Posts
    600

    Re: Need a macro to delete all rows not meeting a criteria in column A

    The quick and dirty way to do this is filter Col A by everything not equal to Ye. From there you can select all the rows and delete them. No VBA needed.

  3. #3
    Registered User
    Join Date
    06-07-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    72

    Re: Need a macro to delete all rows not meeting a criteria in column A

    Quote Originally Posted by day92 View Post
    The quick and dirty way to do this is filter Col A by everything not equal to Ye. From there you can select all the rows and delete them. No VBA needed.
    A macro is needed, please. I don't have the time to delete all the rows manually. There can be 1000s of rows per sheet and I have to do this to 20+ workbooks with 12 sheets each, I need to have this done with a macro.

  4. #4
    Forum Contributor day92's Avatar
    Join Date
    04-20-2010
    Location
    Los Angeles
    MS-Off Ver
    Excel 360
    Posts
    600

    Re: Need a macro to delete all rows not meeting a criteria in column A

    Ok here you go. This should do the trick.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-07-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    72

    Re: Need a macro to delete all rows not meeting a criteria in column A

    WOrks perfect, thank you!

+ 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