+ Reply to Thread
Results 1 to 4 of 4

Expand AutoFilter Range

  1. #1
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Expand AutoFilter Range

    I am using this code to AutoFilter a range based on a "-" value:

    Please Login or Register  to view this content.
    However, whenever "-" is found with a blank row above it I want to expand the range up two rows and whenever a "-" is found with a blank row below it I want to expand the range down two rows, so when the macro is run it will delete the two rows above and below the "-" values in addition to the rows containing the "-" values. Please see attached sample showing the range and the expeced result.

    Is this somehow possible to achieve?

    Many thanks
    Attached Files Attached Files
    Thanks,
    HangMan

    You can say "Thank you!" by clicking Add Reputation below the post.
    Please, mark your thread [SOLVED] if you are happy with the solution.

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Expand AutoFilter Range

    Maybe :

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Expand AutoFilter Range

    Hi karedog,

    This looks to be working really well, I'll do some further testing and let you know if I run into any problems...

    Many thanks for taking the time to look at this, it's been a huge help.
    Last edited by HangMan; 11-17-2015 at 08:04 AM.

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Expand AutoFilter Range

    You are welcome, glad I can help.


    Regards

+ 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 method of Range class failed - Yet autofilter works.
    By Carlsbergen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2009, 05:43 PM
  2. Expand a Range non VB
    By starbwoy in forum Excel General
    Replies: 3
    Last Post: 03-27-2008, 12:17 PM
  3. enable autofilter/ expand collapse
    By mitelkm in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-22-2008, 01:53 PM
  4. Range that expand
    By Juran in forum Excel General
    Replies: 1
    Last Post: 08-07-2006, 08:55 PM
  5. Expand range help
    By David in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2006, 08:35 PM
  6. how to expand the autofilter range 1000 to 10000?
    By master777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-13-2006, 05:45 AM
  7. Replies: 1
    Last Post: 07-07-2005, 09:05 AM
  8. [SOLVED] Data Range Will Not Expand
    By Dmorri254 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-11-2005, 05:06 PM

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