title: Range not working across sheets
body: <p>I have the below code in VBA. The issue with the below code is range is referring to <code>data</code> sheet and as soon as I am in some other sheet it fails.</p>
  
  <pre><code>monthname = Range("D5", Range("D5").End(xlToRight)).Cells.Count - 1
  </code></pre>
  
  <p>Can you please provide me a solution wherein no matter where I am in the workbook range should always pick from the <code>data</code> sheet?</p>