+ Reply to Thread
Results 1 to 5 of 5

Excel Filter Problems

  1. #1
    Registered User
    Join Date
    02-10-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    16

    Excel Filter Problems

    Hi all,

    I have a spreadsheet at my school which logs time out data. This is used by all members of staff and is regularly filtered. I have already set up a macro to clear filters when save or close is clicked (people kept closing the sheet and saving with filters which was causing all sorts of problems) However I have a new issue. People keep filtering the sheet, then leaving it open and filtered. The next person will come along and add info with filters on and then it messes up the sheet.

    Can anyone think of a way (apart from banning people from using the sheet) of automatically clearing the filters as soon as someone attempts to make an entry. Or blocking anyone from entering any information until they have cleared the filters?

    Thanks JE

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Excel Filter Problems

    Hi emers21,

    The following Macro which MUST be placed in the Sheet Module may do what you want. If AutoFilter Is on then:
    a. UNDO the most recent change
    b. Turn AutoFilter Mode OFF
    c. Put back the most recent change

    Please Login or Register  to view this content.
    Lewis

  3. #3
    Registered User
    Join Date
    02-10-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Excel Filter Problems

    Hi Lewis,

    Thanks for looking, unfortunately that doesn't work. Staff need to be able to look at the sheet and filter so I need to leave filter option on the sheet on. However the problem is a member of staff will filter to look at a particular entry then leave the filter on. If they try and save the sheet I have a macro that turns the filter off, if they try and close the sheet I have a macro that turns it off. However I need to write something that stops an entry being made on the sheet until the filters are turned off

    Any ideas?

    John

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Excel Filter Problems

    Try this. This will turn the filters off, put the entry in, then turn the filter on again, but does NOT save previous filter settings. Previous filter settings can be saved if need be.

    You will need to insert the range for your filter and the range for the filter header in the code.

    Please Login or Register  to view this content.
    Lewis

  5. #5
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Excel Filter Problems

    However I need to write something that stops an entry being made on the sheet until the filters are turned off
    The following will:
    a. Allow data entry if AutoFilter is OFF.
    b. UNDO data entry if AutoFilter is ON, and display a message indicating that 'Data Entry' is NOT allowed until Filters are off.

    Lewis

    Please Login or Register  to view this content.

+ 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. Filter Problems
    By Stopea in forum Excel General
    Replies: 1
    Last Post: 08-21-2012, 10:34 AM
  2. Excel 2010 Advanced Function Filter problems - 2007 issues
    By adamwestrop in forum Excel General
    Replies: 3
    Last Post: 07-29-2011, 01:52 PM
  3. Filter Problems
    By Gorf3 in forum Excel General
    Replies: 3
    Last Post: 01-08-2008, 01:56 PM
  4. [SOLVED] Filter problems
    By Berry in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-13-2006, 09:30 AM
  5. [SOLVED] Excel 2000 filter problems
    By Steve Walford in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-08-2006, 03:35 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