title: Sum visible (or filtered) range in an Excel Spreadsheet
body: <p>In Excel, I need to filter and display the <em>COUNTIF</em> &amp; <em>SUM</em> of both the <em>global range</em> and the <em>visible (or filtered) range</em>.</p>
  
  <p>I can already display the <em>COUNTIF</em> &amp; <em>SUM</em> of the <em>global range</em> with the following code.</p>
  
  <pre><code>AtmCount = Application.WorksheetFunction.CountIf(Range("X3:X4533"), "&gt;0")
  AtmSum = Application.WorksheetFunction.Sum(Range("X3:X4533"))
  </code></pre>
  
  <p>I can also get the <em>COUNT</em> of the <em>visible (or filtered) range</em> as follows:</p>
  
  <pre><code>AtmCurrentCount = Range("X3:X4533").SpecialCells(xlCellTypeVisible).Count
  </code></pre>
  
  <p>However, this still leaves the <em>SUM</em> of <em>visible (or filtered) range</em> outstanding.</p>
  
  <pre><code>AtmCurrentSum = ???
  </code></pre>
  
  <p>I really stuck. Please, can somebody help me?</p>