title: Excel VBA Subtracting one column from another, but not in a cell
body: <pre><code>Sub TryAgain()
      Dim A As Range '~ I will put the result in this column, A
      Dim B As Range
      Dim C As Range '~ [B-C] is the what I need
      Dim onecell As Range
      Dim twocell As Range
      Set B = Range("C2", Range("C2").End(xlDown)) 'log prices of Z over time
      Set C = Range("D2", Range("D2").End(xlDown)) 'log prices of WPC over time
      Set A(1) = B.Value - C.Value
  End Sub
  </code></pre>
  
  <p>I've been struggling with solving this annoying problem for a while.</p>
  
  <p>This is the SIMPLE subtracting operation between two columns, </p>
  
  <p>so what i want to do is conduct the subtract operation 'CELL-BY-CELL'</p>
  
  <p><strong>BUT! I don't want to put the results in cells (to be referred) or creating any other sheets.</strong> </p>
  
  <p>So, I <strong>want to assign the subtraction result (i.e. C2-D2, C3-D3 ...) directly into a variable called A (this should be a column),<br>
  NOT recording on worksheet cells and referring the cells</strong>, but this is obviously very difficult to get it through.</p>
  
  <p>is there any other way to do this?</p>
  
  <p>Much appreciated in advance!</p>