title: How to convert this formula into a VBA code?
body: <p>I'm starting to study VBA but even searching for the functions needed for this I could not mount the VBA code. I searched for the functions to simulate INDEX and MATCH in VBA, but I could not mount the code correctly.</p>
  
  <p>I have a table to fill where in each cell is the following formula, for example in cell C11:</p>
  
  <pre><code>=IF(INDEX('Sheet1'!$G:$G;MATCH($B11&amp;C$10;'Sheet1'!$B:$B&amp;'Sheet1'!$A:$A;0))&lt;&gt;"";"sm";
  IF(INDEX('Sheet1'!$E:$E;MATCH($B11&amp;C$10;'Sheet1'!$B:$B&amp;'Sheet1'!$A:$A;0))&lt;&gt;"";"ok";0))
  </code></pre>
  
  <p>I would like to transform this formula into a VBA code.</p>
  
  <p>Thanks in advance for the help!</p>