Count cells after applying an Excel filter

Solved
lgabriel -  
 12 -
Hello,

I have a small question: I have a table in Excel and I'm supposed to count the occurrences of the word "Médecin" in a column (to get the total). The problem is that when I apply a filter and use "countif()", the function counts everything, including the cells that are hidden by the filter, while I only need the filtered data. Thank you in advance for your answer.

Gabriel
Configuration: Windows XP Internet Explorer 6.0

10 answers

  1. Mabelle60 Posted messages 167 Registration date   Status Member Last intervention   131
     
    Hi
    The SUBTOTAL function addresses this issue

    =SUBTOTAL(3,'your field') : counts the number of displayed values
    =SUBTOTAL(9,'your field') : sums the values as long as they are numeric

    There are others (from 1 to 9 I think) but I only remember these two. I'll find them again..
    59
    1. cedridoc777777 Posted messages 85 Status Member
       
      Great, that's exactly what I was looking for! ;-)
      0
    2. romain pav
       
      Thank you for your help, it works in my case with SUBTOTAL(3; fields)
      0