title: Mirror Cell Values in Excel Using VBA
body: <p>I am trying to the value of some cells using the code below but it is coming up with an error (Method 'Range' of object'Worksheet' failed) on one line(Worksheets(wsName).Range). I imagine that it is because i am referencing data with the same worksheet but i cannot find what to put instead of worksheets. Also it does not update if the value in cell D5 changes it just stays what it originally was in F5. Can anyone help me out with this?</p>
  
  <pre><code>Public Sub Worksheet_Change(ByVal Target As Range)
     MirrorCells
  End Sub
  Public Sub MirrorCells()
     Dim DestinationWS As Variant
     DestinationWS = Array("Stock Levels") 
     Dim wsName As Variant
  
     For Each wsName In DestinationWS
        Worksheets(wsName).Range("F5") = Range("D5")
     Next wsName
  End Sub
  </code></pre>