title: Autofill with VBA when columns are dynamic too?
body: <p>I transposed dynamic number of rows to columns in an adjacent table (same sheet) to use as headers and then loop a formula into then next row for each header.
  I need VBA to select the whole range I just wrote formulas to and then to autofill selected columns down a defined amount of times (defined with a variable/integer in a cell).</p>
  <p>My # of columns AND rows will change because the number of rows in my origin table will change (columns in new table) and the number of iterations defined will change (rows in new table). This is a portion of my code:</p>
  <pre><code> Range(Selection, Selection.End(xlToRight)).Select
   Selection.AutoFill Destination:=Range(&quot;Q3:&quot; &amp; &quot;AW&quot; &amp; &quot;lastrow&quot;), Type:=xlFillDefault
  </code></pre>
  <p>Here, lastrow takes care of the dynamic rows, but how can I replace the AW with code that represents the last column if it becomes AA, BZ, or anything else?<br />
  I can't seem to figure it out, hoping somebody smart can aid me here...</p>