+ Reply to Thread
Results 1 to 6 of 6

VBA to actvate Unfilter after Auto Filter

  1. #1
    Forum Contributor
    Join Date
    02-01-2008
    Location
    Perth, Australia
    MS-Off Ver
    Excel 365
    Posts
    135

    VBA to actvate Unfilter after Auto Filter

    Hi All,

    I have pieced together the below code to autofilter a workbook based on the cell entry in Sheet 1, A1. The code works great whilst sorting the information, but has a run time error when entry is " ", this entry should unsort all infomation in the previously sorted sheets.
    I would also like the first two sheets excluded from the sort and the code to run on the cell change.

    Please Login or Register  to view this content.
    Any help is much appreciated

    Cheers

    Adam
    Last edited by VBA Noob; 09-19-2008 at 01:52 AM. Reason: Poor title

  2. #2
    Forum Contributor Kieran's Avatar
    Join Date
    10-02-2003
    Location
    Perth, Western Australia
    MS-Off Ver
    Office 2003
    Posts
    109
    Try this (untested)

    Please Login or Register  to view this content.
    Last edited by Kieran; 09-19-2008 at 02:02 AM. Reason: to apologise for not wrapping the code. Sorry
    Kieran

  3. #3
    Forum Contributor
    Join Date
    02-01-2008
    Location
    Perth, Australia
    MS-Off Ver
    Excel 365
    Posts
    135
    Hi Keiran,

    That works really well thank you.
    Do you have the appropriate code for this to run on the cell change in sheet 1.
    I assume I would locate the original code in a module?

    Cheers

    Adam

  4. #4
    Forum Contributor Kieran's Avatar
    Join Date
    10-02-2003
    Location
    Perth, Western Australia
    MS-Off Ver
    Office 2003
    Posts
    109
    Try this in the worksheet 1 code module (not in a separate module)
    Please Login or Register  to view this content.
    Last edited by Kieran; 09-19-2008 at 02:02 AM. Reason: Wrap code in code tags

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Kieran,

    Please use code tags when posting as per forum rules below. I've done it for you this time

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  6. #6
    Forum Contributor
    Join Date
    02-01-2008
    Location
    Perth, Australia
    MS-Off Ver
    Excel 365
    Posts
    135

    Talking Fantastic

    Thanks Keiran,

    That works like a charm.

    Cheers

    Adam

+ 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. Auto Filter Limitations
    By taichi56 in forum Excel General
    Replies: 3
    Last Post: 06-08-2008, 04:12 PM
  2. Top ten not using Auto Filter
    By celestialspring in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-23-2007, 03:32 AM
  3. Auto Filter
    By new@this in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2007, 11:04 AM
  4. auto filter
    By sach0025 in forum Excel General
    Replies: 3
    Last Post: 02-08-2007, 03:52 PM
  5. Custom Auto Filter for more than two cells
    By coopster in forum Excel General
    Replies: 2
    Last Post: 02-07-2007, 09:23 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