title: How to extract column from cell (Excel, VBA)
body: <p>I'm running into a (run-time error '1004': Application-defined or object-defined error) error while trying to write my first Excel VBA Macro. I've looked at similar questions on stack overflow and other sites, but my issue seems to be more basic than issues others are having. </p>
  
  <p>Currently, I'm trying to take the data from two cells from one sheet and write them to another sheet. I understand that trying to find the column or row of a cell that I reference by cell or row is unnecessary, but eventually I will use for-loops and will substitute the specific cell references with variables.</p>
  
  <p>Here are the two lines of code that I have:</p>
  
  <pre><code>Worksheets("Sheet2").Range("A1").Value = Worksheets("Sheet1").Range("A" &amp; Worksheets("Sheet1").Range("B2").Row).Value
  Worksheets("Sheet2").Range("B1").Value = Worksheets("Sheet1").Range(Worksheets("Sheet1").Range("B2").Column &amp; "1").Value
  </code></pre>
  
  <p>The first line runs fine. It writes Sheet1's A2 to Sheet2's A1.
  The second line does not run, does not write Sheet1's B1 to Sheet2's B1,  references the error, and I'm not sure why.</p>
  
  <p>Thank you for your time and help!</p>