+ Reply to Thread
Results 1 to 4 of 4

SUBTOTAL and Filter Mode

  1. #1
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    SUBTOTAL and Filter Mode

    HI,

    See the file in attach.

    I have two tables in the same page that the number of rows is dynamic.
    Table2 is always 3 rows below Table1 regardless the number of rows of Table1.

    1) I need to calculate the total number of rows of each table and put the result in "E4" an "E15" regardless the number of rows of each table.

    2) If Iuse a filter or in the range("B6:E6") or range("B17:E17") and change it, I need to values in "E4" and "E15" to be updated.

    Here is some code that I was trying to use:

    Please Login or Register  to view this content.
    Regards,
    Elio Fernandes
    Attached Files Attached Files
    Last edited by efernandes67; 07-31-2010 at 10:57 PM.

  2. #2
    Forum Contributor
    Join Date
    03-11-2010
    Location
    India
    MS-Off Ver
    2010
    Posts
    268

    Re: SUBTOTAL and Filter Mode

    Does this help?

    Please Login or Register  to view this content.
    hth
    Ajay

  3. #3
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    Re: SUBTOTAL and Filter Mode

    Hi Ajay,

    Your code helps but its not enough because, I need the values in "E4" and "E15" to change when I used the Filter.

    Can you give me an hand?

    Regards,
    Elio Fernandes

    Quote Originally Posted by ajaykgarg View Post
    Does this help?

    Please Login or Register  to view this content.
    hth
    Ajay

  4. #4
    Forum Contributor
    Join Date
    03-11-2010
    Location
    India
    MS-Off Ver
    2010
    Posts
    268

    Re: SUBTOTAL and Filter Mode

    Hello Elio

    I thought Worksheet_Calculate() event will be fired when filter criteria is changed, but that is not true.
    I hope someone on the forum can tell us which event is fired when filter criteria is changed.
    You need to copy above code in that event.

    thx
    Ajay

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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