+ Reply to Thread
Results 1 to 5 of 5

Selecting all rows after applying filter.

  1. #1
    Registered User
    Join Date
    11-15-2013
    Location
    Newquay, Cornwall
    MS-Off Ver
    Excel 2010
    Posts
    67

    Selecting all rows after applying filter.

    I am trying to write a macro to select any visible rows after applying a filter, except in Row 1.

    Sometimes the first row is A2, sometimes it is A157. The last row can vary greatly too depending on the size of the report.

    Can anyone tell me how to encapsulate that into this macro?

    Please Login or Register  to view this content.
    I see that at the beginning I might need a change too. Where the activesheet range shows $y$9793, the report might be 10-15000 rows instead. Does that need changing?

    Many thanks.

  2. #2
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    702

    Re: Selecting all rows after applying filter.

    Hi Graham Pall,

    You have to set up upper bound and lower bound.

    Try This,
    Please Login or Register  to view this content.
    please add my reputation if it has solved your problem

  3. #3
    Registered User
    Join Date
    11-15-2013
    Location
    Newquay, Cornwall
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Selecting all rows after applying filter.

    Thanks Farid. Not quite there yet though. Do I simply substitute the original code in my OP for your code? Or is yours a seperate sub macro that gets called into the main macro?

    Sorry for the noobishness. Still learning.
    Last edited by Graham Pall; 11-10-2014 at 10:28 AM.

  4. #4
    Registered User
    Join Date
    11-15-2013
    Location
    Newquay, Cornwall
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Selecting all rows after applying filter.

    Hmm, weird, I adjusted the code to include the correct worksheet, and it filtered and deleted correctly on the second work sheet, but not the first. How strange.......

  5. #5
    Registered User
    Join Date
    11-15-2013
    Location
    Newquay, Cornwall
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Selecting all rows after applying filter.

    Ok, so it might help if I put up the whole section of macro of what I am trying to achieve, which is basically this..... but without selecting particular rows, just any that are remaining, bar the 1st row.

    Please Login or Register  to view this content.
    So what I am trying to achive is.....

    On the first Tab, "Converting backlog" I am try to get rid of anything that is not under material grouping "CH01_Converting"
    On the 2nd tab, "Pallchek backlog" I am trying to get rid of anything that is not under material grouping "CH01_Pallchek"
    On the 3rd tab "Media Backlog" I am trying to get rid of any material grouping that is "CH01_Converting" or "CH01_Pallcheck".

    etc..

    There must be a simple way of doing this?
    Last edited by Graham Pall; 11-12-2014 at 10:21 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. Selecting visible rows post applying filters
    By Raghukumarn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2014, 06:41 AM
  2. Auto Filter Not Applying
    By jvbeats in forum Excel General
    Replies: 7
    Last Post: 02-26-2013, 03:46 AM
  3. Copy specific rows to a new sheet after applying Filter
    By Saarang84 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-02-2010, 10:14 PM
  4. applying filter in a row
    By anuj_sethi1043 in forum Excel General
    Replies: 3
    Last Post: 04-29-2009, 10:45 AM
  5. Applying auto-filter with large number of rows
    By Hari in forum Excel General
    Replies: 3
    Last Post: 01-29-2006, 11:10 PM

Tags for this Thread

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