Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Mar 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro's and AutoFilter (Excel 2000 Professional)

    I have Auto Filters turned on. I'm running a Macro but want to make sure that all data is shown before I run the Macro.

    Can you write an IF/THEN statement in the Macro that will show all data if any columns are filtered and then run the Macro or if no columns are filtered just run the Macro?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Macro's and AutoFilter (Excel 2000 Professional)

    Welcome to Woody's Lounge!

    You can use this:

    If ActiveSheet.FilterMode Then
    ActiveSheet.ShowAllData
    End If

    You can replace ActiveSheet with a worksheet variable if necessary.

  3. #3
    New Lounger
    Join Date
    Mar 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro's and AutoFilter (Excel 2000 Professional)

    Thanks. That worked perfectly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •