title: Using VBA instead of using formula (INDEX & MATCH) in every cells Excel
body: <p>As you can see on the "Data" sheet, I have data table like this (Pls see below)</p>
  
  <p><a href="https://i.stack.imgur.com/AnXRM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AnXRM.jpg" alt="Data Sheet"></a></p>
  
  <p>The Output that I want to be is like this :</p>
  
  <p><a href="https://i.stack.imgur.com/C34WC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C34WC.jpg" alt="Output Sheet"></a></p>
  
  <p>Currently in the Output sheet,</p>
  
  <ol>
  <li>I have to manually add-in YYYYMM each column for every month </li>
  <li><p>For each month of the column, I have to put formula to get the Order Qty.
  formula is like this:</p>
  
  <pre><code>=IFNA(INDEX(Data!C:C,(MATCH(A3&amp;$B$2,Data!D:D,0))),"")
  </code></pre></li>
  </ol>
  
  <p>The code can give me the Order Qty of each month.</p>
  
  <p>However, what I wanted to do is generate monthly and get the Order Qty by using <strong>VBA</strong>.</p>