Consulting

Results 1 to 3 of 3

Thread: Remove "Filters" from Macro Script

  1. #1

    Remove "Filters" from Macro Script

    Hi. Can someone help me locate the part of my script that contains the action to enable/disable filters? Circled below.

    Capture.PNG


    Sub Macro2()'
    ' Macro2 Macro
    '
    
    
    '
        Cells.Replace What:=" ", Replacement:="", LookAt:=xlPart, SearchOrder:= _
            xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
        Cells.Replace What:="x", Replacement:="*", LookAt:=xlPart, SearchOrder _
            :=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
        Cells.Replace What:="""", Replacement:="", LookAt:=xlPart, SearchOrder _
            :=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
        Range("C1").Select
        Application.CutCopyMode = False
        Application.CutCopyMode = False
        ActiveCell.FormulaR1C1 = "=RC[-2]&RC[-1]"
        Range("C1").Select
        Selection.AutoFill Destination:=Range("C1:C29")
        Range("C1:C29").Select
        LastRow = Range("A1").End(xlDown).Row ' Ctrl+Down from cell A1
    Range("C1").AutoFill Destination:=Range("C1:C" & LastRow)
    Range("C1").AutoFilter
        Selection.Copy
        Range("D1").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
    End Sub

    Thanks for your help!!

  2. #2
    VBAX Wizard
    Joined
    Apr 2007
    Posts
    6,936
    Location
    Probably

    Range("C1").AutoFilter
    
    Paul

    ------------------------------------------------------------------------------------------------------------------------
    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s)
    (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  3. #3
    Quote Originally Posted by Paul_Hossler View Post
    Probably

    Range("C1").AutoFilter
    

    That worked, thanks

Posting Permissions

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