+ Reply to Thread
Results 1 to 12 of 12

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

  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")


    Please Login or Register  to view this content.
    Last edited by wacky_diva; 11-29-2016 at 07:06 PM.

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394
    Quote Originally Posted by wacky_diva View Post
    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")


    Please Login or Register  to view this content.
    I think that Criterea in Criterea:=Range("ModelMeter") should be spelled Criteria:=...

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

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

    wow! how embarrassing.
    I have made the change but it is still getting stick at that point.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013
    Posts
    16,351

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

    Please Login or Register  to view this content.
    Besides typo, if should work when Range("ModelMeter") refers to a single cell or value.

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

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

    yeah, I thought so too. There is a name range "ModelMeter" so I don't know what is happening, it is recognizing the name range earlier in the code and running the change event.
    Could it have something to do with the fact that the code is in the sheet? I access it through right click on tab and view code.

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

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

    Actually I think you're right, the code is running on change of the cell below as well, therefore I don't think its recognising the name range.

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

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

    but it is absolutely a name range,Capture.PNG

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013
    Posts
    16,351

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

    Try change to
    Please Login or Register  to view this content.

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

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

    Hi Jindon,
    Its still not working.

    The code seems to be executing on changes of other cells also not the one named "ModelMeter".

    ?!?!
    Last edited by wacky_diva; 12-05-2016 at 11:46 PM.

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013
    Posts
    16,351

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

    Then I need to see your workbook...

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

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

    I can't I'm afraid, sorry.

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

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

    I played with some of the name ranges and not it is running the entire code with the exception the below part stopping at " .Sort.SortFields.Add Key:=Range("Patterns[IUT]"), SortOn:=xlSortOnValues, Order:= _
    xlAscending, DataOption:=xlSortNormal"

    Please Login or Register  to view this content.
    Last edited by wacky_diva; 12-07-2016 at 01:58 AM.

+ 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. 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