title: Reversing a Referenced Range Order in VBA
body: <p>I'm trying to transfer data from workbook x into workbook y. I want to copy a horizontal range from workbook x, transpose and reverse the range and then paste the values in workbook y. I would it to look like this:</p>
  <p>Workbook x</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">ColumnX</th>
  <th style="text-align: center;">ColumnXx</th>
  <th style="text-align: right;">ColumnXy</th>
  <th style="text-align: right;">ColumnXz</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">9</td>
  <td style="text-align: center;">8</td>
  <td style="text-align: right;">10</td>
  <td style="text-align: right;">7</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Workbook y</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Column</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>7</td>
  </tr>
  <tr>
  <td>10</td>
  </tr>
  <tr>
  <td>8</td>
  </tr>
  <tr>
  <td>9</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>So far, I can transpose the values but I've been searching how to reverse the range and haven't found any solutions using VBA. My current code:</p>
  <pre><code>Dim x As Workbook
  Dim y As Workbook
  Dim vals As Variant
  
  
  Set y= ThisWorkbook
  Set x= Workbooks.Open(&quot;FileName.xls&quot;, CorruptLoad:=XlCorruptLoad.xlRepairFile)
  
  vals = x.Sheets(&quot;SheetSource&quot;).Range(&quot;G10:C10&quot;).Value
  
  y.Sheets(&quot;Sheet1&quot;).Range(&quot;G8:G12&quot;).Value = WorksheetFunction.Transpose(vals)
  </code></pre>