title: Change Excel formula to total only visible cells
body: <p>I'm using the following formula to create a total of unique values</p>
  
  <blockquote>
    <p>=SUM(IF(FREQUENCY(MATCH(C4:C9,C4:C9,0),MATCH(C4:C9,C4:C9,0))>0,1))</p>
  </blockquote>
  
  <p>However, I'm now using an autofilter, so I now need it to sum only the visible rows. I've read that I need to use SUBTOTAL instead of SUM, but I'm not sure how to change the formula above correcly.</p>
  
  <p>Any ideas?</p>