title: VBA script to replace cell value and keep formatting
body: <p>I have the below table in word that I'm trying to write a script to replace the contents of the below cell with a different customer payment (i.e replace the £1,100 with £2,000). Below is a snippet of my script but the when I write back to the cell it loses all the formatting and the numbered list.</p>
  
  <p><strong>How can I keep replace the cell data with very similar data and still keep the formatting?</strong></p>
  
  <p>ps. I've simplified the contents of the cell to make it easier to read, so the code won't apply to exactly that content</p>
  
  <p><a href="https://i.stack.imgur.com/A9iBm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A9iBm.png" alt="Before"></a>
  <a href="https://i.stack.imgur.com/dRhUm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dRhUm.png" alt="After"></a></p>
  
  <pre><code>DescPlan = Trim(t1.Cell(2, 2).Range.Text)
  DescTest = InStr(1, DescPlan, ":")
  finalString = Left(DescPlan, DescTest)
  
  t1.Cell(2, 2).Range.Text = Replace(DescPlan, finalString, "Payment by the customer of " + Format(v, "Currency") + " will be due upon completion of items below:")
  </code></pre>