Results 1 to 2 of 2
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Count line filtred... (2000 r s1)

    .. i use this old my little macro to count only line filtred....
    is possible to automate this macro for each time when i filtre a value...
    example: a filtre a vlue and automaticly update the cell J4...

    Sub CONTA_CON_FILTRO()
    Dim FILTRO As Range
    Set FILTRO = ActiveSheet.AutoFilter.Range
    Range("J4") = FILTRO.Columns(1).SpecialCells(xlVisible).Count - 1
    End Sub

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Count line filtred... (2000 r s1)

    You don't need code for this, you can use the SUBTOTAL function. Say that the cells you want to count are in A4:A299. Enter this formula in J4:

    =SUBTOTAL(3,A5:A299)

    It will be updated automatically as you filter the table.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •