title: How to count hidden/filtered out rows that has content in them using excel VBA?
body: <p>The code below only shows the count of the visible rows, however, when the rows are filtered prior to running the code, it won't detect the hidden rows.</p>
  
  <pre><code>Total_rows_Pick = Workbooks("Job Production Monitoring.xlsm").Worksheets("Pick-ups").Range("B" &amp; Rows.count).End(xlUp).Row
  </code></pre>
  
  <p>What should I do to get the equivalent code which includes detecting even hidden/filtered out rows that has text written in them?</p>
  
  <p>Example of my filtered worksheet is  (notice row 2 is filtered out):
  <a href="https://i.stack.imgur.com/JZjLM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JZjLM.png" alt="Filtered Worksheet"></a></p>
  
  <p>After running the line of code above,the locals window only count the headers, but not row 2.</p>
  
  <p>The screenshot of the variable as shown in the locals window:
  <a href="https://i.stack.imgur.com/3zArt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3zArt.png" alt="Only header is counted"></a></p>