+ Reply to Thread
Results 1 to 7 of 7

vba, advancedfilter macro doesn't work for all the data

  1. #1
    Forum Contributor
    Join Date
    05-05-2020
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    100

    vba, advancedfilter macro doesn't work for all the data

    Hi

    I'm using this macro to filter my data but it only filters the first 6 rows.

    Please Login or Register  to view this content.
    This code copies selected things that user wants to filter to Criteria-table
    Please Login or Register  to view this content.
    Is there another way to select the data (that will populate over time) instead of range().currentregion?
    I'd appreciate it if anyone could help with this

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: vba, advancedfilter macro doesn't work for all the data

    Hi there,

    Assuming your data for filtering begin in column A, over how many columns do your data extend?

    Which column contains data which indicate the end (last row) of the data to be filtered?

    Regards,

    Greg M

  3. #3
    Forum Contributor
    Join Date
    05-05-2020
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    100

    Re: vba, advancedfilter macro doesn't work for all the data

    Quote Originally Posted by Greg M View Post
    Hi there,

    Assuming your data for filtering begin in column A, over how many columns do your data extend?

    Which column contains data which indicate the end (last row) of the data to be filtered?

    Regards,

    Greg M
    my data is in a table from A to K and the number of the rows populates over time. right now I put a few examples and it has 10 rows.

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: vba, advancedfilter macro doesn't work for all the data

    Hi there,

    If the last filled cell in column A defines the last row of your data set to be filtered, see if the following version of your "FilterMe" routine does what you need:

    Please Login or Register  to view this content.
    The highlighted values may be altered to suit your requirements.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  5. #5
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent SAC
    Posts
    8,885

    Re: vba, advancedfilter macro doesn't work for all the data

    Quote Originally Posted by (T_T) View Post
    my data is in a table
    If you mean an actual Table, then you can refer to it using the Listobject in VBA, and its full range using the Listobject.Range property.
    Rory

  6. #6
    Forum Contributor
    Join Date
    05-05-2020
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    100

    Re: vba, advancedfilter macro doesn't work for all the data

    Quote Originally Posted by Greg M View Post
    Hi there,

    If the last filled cell in column A defines the last row of your data set to be filtered, see if the following version of your "FilterMe" routine does what you need:

    Please Login or Register  to view this content.
    The highlighted values may be altered to suit your requirements.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Thank you very much

  7. #7
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: vba, advancedfilter macro doesn't work for all the data

    Hi again,

    Many thanks for your feedback and also for the Reputation increase - much appreciated!

    You're welcome - glad I was able to help.

    Best regards,

    Greg M

+ 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. macro made in Windows to pull web data in doesn't work on a Mac
    By brocktoon93 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2015, 08:19 PM
  2. [SOLVED] Macro work in personal workbook, doesn't work in other workbooks
    By Centexcel in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-30-2013, 11:47 AM
  3. [SOLVED] Macro Doesn't Work Through Button, Does Work Through Developer ->Macros Option
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-27-2013, 11:55 AM
  4. Since when does AdvancedFilter not work if a starting cell is blank?
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-19-2013, 08:27 PM
  5. advanced filter macro doesn't work on large data set
    By bullkater in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-02-2009, 08:05 AM
  6. [SOLVED] Advancedfilter copy in place doesn't use criteria range correctly
    By Josh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2005, 10:35 AM
  7. [SOLVED] Advancedfilter doesn't work when Excel opens, but does when run macro
    By Josh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-08-2005, 05:50 PM

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