title: How to update range macro when cells in Excel are inserted/deleted
body: <p>I would like to ask if there is a way to update the range specified in a macro when I insert/delete cells.</p>
  
  <p>For example, I have specified the range in a subroutine in my macro to be </p>
  
  <pre><code>Worksheets("Query Screen").Range("M22:M25") = "0"
  </code></pre>
  
  <p>Now, if I insert a new row between <code>M22</code> and <code>M25</code>, what can I do to update the range in my macro automatically to be</p>
  
  <pre><code>Worksheets("Query Screen").Range("M22:M26") = "0"
  </code></pre>
  
  <p>Thus, is it possible to update the macro based on changes in the Excel spreadsheet?</p>