Results 1 to 1 of 1
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    La Jolla, CA
    Posts
    1,470
    Thanks
    30
    Thanked 62 Times in 58 Posts

    Macro question/issue with filtered list

    I have a sheet (A) in a workbook that is populated from another sheet. On sheet A (for lack of a better name for now), I filter to not show 0s and blanks. I want an update macro to refilter the sheet whenever I or a user runs the macro. However, this code:

    Sub Update()
    '
    ' Update Macro
    '
    '
    ActiveSheet.Range("$D$4:$T$34").AutoFilter Field:=1
    ActiveSheet.Range("$D$4:$T$34").AutoFilter Field:=1, Criteria1:= _
    "=Arrowwood", Operator:=xlOr, Criteria2:="=ShadowRdg"
    End Sub


    Isn't doing it properly after a third entry is made (on another sheet) and populates this one (A).

    Obviously, what's missing is something that displays ALL the records, then automatically filters to not display the 0s and not display the blanks. HELP... Thanks in advance.

    It appears that when I uncheck 0s and blanks, the macro lists those that are selected...which I have no way of knowing whenever the sheet is updated. I want the macro to say "show all, except 0s and blanks"... hope that makes sense.

    Just had the "ah ha" experience. This apparently does it.

    Sub Update()
    '
    ' Update Macro
    '
    '
    ActiveSheet.Range("$D$4:$T$34").AutoFilter Field:=1
    ActiveSheet.Range("$D$4:$T$34").AutoFilter Field:=1, Criteria1:="<>", Operator:=xlAnd, Criteria2:="<>0"

    End Sub


    Nice to learn on your own...
    Last edited by kweaver; 2011-07-13 at 12:06. Reason: more comments

Posting Permissions

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