title: Deleting and reuploading data table without references having #REF issues [Excel]
body: <p>I created a VBA script that deletes an existing data table (named Data) and replaces it with a new version (that has the same headers and is named Data). I have a lot of formulas and charts that rely on this table and was wondering how I can keep the references working after changing the table (so that pivot tables, formulas, and array formulas update automatically when I update the Data table).</p>
  
  <p>Below are some pictures of the problems I am running into:</p>
  
  <p><strong>Pivot tables not updating with new data</strong>
  <a href="https://i.stack.imgur.com/mPH3s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mPH3s.png" alt="Pivot table not updating average time value"></a></p>
  
  <p><strong>Data turning to #REF! after deleting Data table</strong>
  <a href="https://i.stack.imgur.com/Jnc86.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jnc86.png" alt="Formulas not updating"></a></p>