Results 1 to 12 of 12

vba on change, filter range and paste filtered values into table

Threaded View

  1. #1
    Forum Contributor
    Join Date
    10-09-2012
    Location
    Adelaide, South Australia
    MS-Off Ver
    Excel 2010
    Posts
    135

    vba on change, filter range and paste filtered values into table

    Hello,
    I am having trouble with the below code, I am trying to put it together myself and as a selftaughter I am struggling.

    Can someone give me a hand? Its saying "named argument not found" at:
    Criterea:=Range("ModelMeter")


    Private Sub Worksheet_Change(ByVal Target As Range)
    ' Pattern Macro
    If Not Application.Intersect(Target, Range("ModelMeter")) Is Nothing Then
        With Range("Patterns")
        If .Range("Patterns").FilterMode = True Then
        Range("Patterns").ShowAllData
        End If
        .AutoFilter field:=2, Criterea:=Range("ModelMeter")
        SortFields.Add _
            Key:=Range("Patterns[Model]"), SortOn:=xlSortOnValues, Order:= _
            xlAscending, DataOption:=xlSortNormal
        SortFields.Add _
            Key:=Range("Patterns[Test Point]"), SortOn:=xlSortOnValues, Order:= _
            xlAscending, DataOption:=xlSortNormal
        With ActiveWorkbook.Worksheets("Patterns").ListObjects("Patterns").Sort
            .Header = xlYes
            .MatchCase = False
            .Orientation = xlTopToBottom
            .SortMethod = xlPinYin
            .Apply
        End With
        .AutoFilter field:=2, Criterea:=Range("ModelMeter")
        Range("Patterns[[Counts Divisor]:[Manual Applied Value]]").SpecialCells(xlCellTypeVisible).Copy
        With Sheets("Test Sheet")
            .Range("Test_Results[[Counts Divisor]:[Manual Applied Value]]").PasteSpecial xlPasteValues
        End With
        Application.CutCopyMode = False
    End With
    End If
    End Sub
    Last edited by wacky_diva; 11-29-2016 at 07:06 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Copy filtered Range, Remove Filter, Find 1st Empty Cell from the bottom, Paste VBA
    By intervals in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-29-2016, 10:48 PM
  2. Replies: 6
    Last Post: 10-16-2014, 08:42 AM
  3. Change Pivot Table Filter Values and Copy Results Over to New Sheet
    By hamidxa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-20-2014, 06:27 PM
  4. How-to Copy and Paste Values from list into Pivot Table filter
    By MacroNerd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-05-2013, 06:26 PM
  5. Change pivot table filter with VBA based on cell values
    By ZeDoctor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2012, 09:03 AM
  6. Paste values on filtered table
    By akotronis in forum Excel General
    Replies: 0
    Last Post: 10-01-2012, 06:42 AM
  7. Paste range of values into filtered sheet
    By ken2005 in forum Excel General
    Replies: 3
    Last Post: 10-03-2005, 07:05 AM

Tags for this Thread

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