+ Reply to Thread
Results 1 to 5 of 5

VBA to update Dynamic Range in filter

  1. #1
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    713

    VBA to update Dynamic Range in filter

    Hello,

    I have below VBA code which I recorded in order to do the selection of filter value.

    Please Login or Register  to view this content.
    But how can I make range in above code to be dynamic? Because every time data would be different so range would wary..
    please assist.

    Thanks,
    Shiva
    Keep the Forum clean :


    1. Use [ code ] code tags [ /code ]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. Show appreciation to those who have helped you by clicking * Add Reputation below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA to update Dynamic Range in filter

    There are a couple of methods. Here is one...

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    713

    Re: VBA to update Dynamic Range in filter

    Can this also work for sub total addition?

    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA to update Dynamic Range in filter

    It could depending on the nature of your data.

    Use .SetRange Range("A1").CurrentRegion and change the .Header = xlYes

    You're welcome.

  5. #5
    Forum Contributor
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    713

    Re: VBA to update Dynamic Range in filter

    works well..

    Thanks

+ 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. Advanced Filter to Dynamic Range
    By John in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-13-2019, 12:06 AM
  2. dynamic date range filter from cell value in vba
    By rustycanada in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2011, 06:47 PM
  3. Filter Range based on dynamic range
    By afb215 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-15-2010, 03:07 PM
  4. Dynamic range to update chart, multiple series
    By staples in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 07-31-2009, 12:26 PM
  5. Advanced filter a dynamic date range
    By oneandoneis2 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-06-2006, 03:57 AM

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